# GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field" class="text-break">Field Class
</h1>
  <div class="markdown level0 summary"><p>Represents the basic input and display unit in GrapeCity.Windows.InputMan.Primitives.FieldsEditorControl.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.visual">Visual</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></div>
    <div class="level4"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.control">Control</a></div>
    <div class="level5"><span class="xref">Field</span></div>
      <div class="level6"><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DateField.html">DateField</a></div>
      <div class="level6"><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskField.html">MaskField</a></div>
      <div class="level6"><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.NumberField.html">NumberField</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.animation.ianimatable">IAnimatable</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iframeworkinputelement">IFrameworkInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.iinputelement">IInputElement</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iqueryambient">IQueryAmbient</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.isupportinitialize">ISupportInitialize</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.html">GrapeCity.Wpf.SpreadSheet.CellType.Editors</a></h6>
  <h6><strong>Assembly</strong>: GrapeCity.Wpf.SpreadSheet.CellType.dll</h6>
  <h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TemplatePart(Name = &quot;PART_ContentHost&quot;, Type = typeof(FieldContentPresenter))]
public abstract class Field : Control, IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, ISupportInitialize</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TemplatePart(Name:=&quot;PART_ContentHost&quot;, Type:=GetType(FieldContentPresenter))&gt;
Public MustInherit Class Field
    Inherits Control
    Implements IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, ISupportInitialize</code></pre>
  </div>
  <h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>This class will implement the view function for a single segment. And some input behavior will exposed to user, too.
This is final interface for user.
When a field is created, it will create a segment and value module for it. Then configuration will be done on the
segment and the value module.</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field__ctor" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.#ctor">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.-ctor.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field__ctor">Field()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_EnterEvent" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.EnterEvent">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.EnterEvent.html">EnterEvent</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.Primitives.Field.Enter routed event.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsActiveProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsActiveProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsActiveProperty.html">IsActiveProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.Primitives.Field.IsActive dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsCompletedProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsCompletedProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsCompletedProperty.html">IsCompletedProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.Primitives.Field.IsCompleted dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsEmptyProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsEmptyProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsEmptyProperty.html">IsEmptyProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.Primitives.Field.IsEmpty dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsFullProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsFullProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsFullProperty.html">IsFullProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.Primitives.Field.IsFull dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_LeaveEvent" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.LeaveEvent">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.LeaveEvent.html">LeaveEvent</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Leave.html">Leave</a> routed event.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsActive" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsActive">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsActive.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsActive">IsActive</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the field is activated or not. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsCompleted" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsCompleted">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsCompleted.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsCompleted">IsCompleted</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the field have been input completely. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsEmpty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsEmpty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsEmpty.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsEmpty">IsEmpty</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the field haven't been input anything, the field is empty. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsFull" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsFull">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsFull.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsFull">IsFull</a>
        </td>
        <td class="markdown level1 summary"><p>Gets whether the field have been input fully. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_SelectionLength" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.SelectionLength">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.SelectionLength.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_SelectionLength">SelectionLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value indicating the number of characters in the current selection.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_SelectionStart" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.SelectionStart">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.SelectionStart.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_SelectionStart">SelectionStart</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a character index for the beginning of the current selection.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_Text" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Text">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Text.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_Text">Text</a>
        </td>
        <td class="markdown level1 summary"><p>Gets current text content of the field.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_BeginInit" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.BeginInit">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.BeginInit.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_BeginInit">BeginInit()</a>
        </td>
        <td class="markdown level1 summary"><p>Starts the initialization process for this element.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_EndInit" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.EndInit">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.EndInit.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_EndInit">EndInit()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates that the initialization process for the element is complete.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_Focus" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Focus">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Focus.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_Focus">Focus()</a>
        </td>
        <td class="markdown level1 summary"><p>Attempts to set focus to this element.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnApplyTemplate" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnApplyTemplate">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnApplyTemplate.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnApplyTemplate">OnApplyTemplate()</a>
        </td>
        <td class="markdown level1 summary"><p>When overridden in a derived class, is invoked whenever application code or internal processes call <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement.applytemplate">ApplyTemplate()</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnEnter_System_Windows_RoutedEventArgs_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnEnter(System.Windows.RoutedEventArgs)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnEnter.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnEnter_System_Windows_RoutedEventArgs_">OnEnter(RoutedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Called when the caret enter to this field.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnGotKeyboardFocus_System_Windows_Input_KeyboardFocusChangedEventArgs_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnGotKeyboardFocus(System.Windows.Input.KeyboardFocusChangedEventArgs)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnGotKeyboardFocus.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnGotKeyboardFocus_System_Windows_Input_KeyboardFocusChangedEventArgs_">OnGotKeyboardFocus(KeyboardFocusChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Invoked when an unhandled <span class="xref">System.Windows.Input.Keyboard.GotKeyboardFocus</span> attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnInitialized_System_EventArgs_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnInitialized(System.EventArgs)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnInitialized.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnInitialized_System_EventArgs_">OnInitialized(EventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Raises the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement.initialized">Initialized</a> event.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnLeave_System_Windows_RoutedEventArgs_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnLeave(System.Windows.RoutedEventArgs)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnLeave.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnLeave_System_Windows_RoutedEventArgs_">OnLeave(RoutedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Called when the care leave from this field.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnPropertyChanged.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_">OnPropertyChanged(DependencyPropertyChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Invoked when any dependency property changed and it must cause renderscope measure or render some time.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnTemplateChanged_System_Windows_Controls_ControlTemplate_System_Windows_Controls_ControlTemplate_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnTemplateChanged(System.Windows.Controls.ControlTemplate,System.Windows.Controls.ControlTemplate)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.OnTemplateChanged.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_OnTemplateChanged_System_Windows_Controls_ControlTemplate_System_Windows_Controls_ControlTemplate_">OnTemplateChanged(ControlTemplate, ControlTemplate)</a>
        </td>
        <td class="markdown level1 summary"><p>Called whenever the control's template changes.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_Enter" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Enter">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Enter.html">Enter</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the input focus enters the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.html">Field</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_Leave" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Leave">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.Leave.html">Leave</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when the input focus leaves the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.html">Field</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
