# GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField" class="text-break">DisplayField Class
</h1>
  <div class="markdown level0 summary"><p>Represents the basic display unit which is shown when control lost keyboard focus.</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">DisplayField</span></div>
      <div class="level6"><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DateDisplayField.html">DateDisplayField</a></div>
      <div class="level6"><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.NumberDisplayField.html">NumberDisplayField</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.componentmodel.isupportinitialize">ISupportInitialize</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iqueryambient">IQueryAmbient</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_DisplayField_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TemplatePart(Name = &quot;PART_ContentHost&quot;, Type = typeof(FieldContentPresenter))]
public abstract class DisplayField : Control, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient</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 DisplayField
    Inherits Control
    Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient</code></pre>
  </div>
  <h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>GrapeCity.Windows.InputMan.Fields.Primitives.DisplayField is shown when control lost keyboard focus.
User can set different format and show different text based on current value of control.</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_DisplayField__ctor" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.#ctor">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.-ctor.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField__ctor">DisplayField()</a>
        </td>
        <td class="markdown level1 summary"></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_DisplayField_Text" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.Text">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.Text.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField_Text">Text</a>
        </td>
        <td class="markdown level1 summary"><p>Gets text associate to the display 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_DisplayField_Focus" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.Focus">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.Focus.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField_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_DisplayField_OnApplyTemplate" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.OnApplyTemplate">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.OnApplyTemplate.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField_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_DisplayField_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.OnPropertyChanged.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_">OnPropertyChanged(DependencyPropertyChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Invoked whenever the effective value of any dependency property on this <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a> has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides <span class="xref">System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)</span>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField_OnTemplateChanged_System_Windows_Controls_ControlTemplate_System_Windows_Controls_ControlTemplate_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.OnTemplateChanged(System.Windows.Controls.ControlTemplate,System.Windows.Controls.ControlTemplate)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.DisplayField.OnTemplateChanged.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_DisplayField_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>

</div>
