# GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField" class="text-break">MaskPatternField Class
</h1>
  <div class="markdown level0 summary"><p>Represents GrapeCity.Windows.InputMan.Fields.MaskPatternField class which can filter input text based on pattern for GrapeCity.Windows.InputMan.GcMask.</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"><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.html">Field</a></div>
    <div class="level6"><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskField.html">MaskField</a></div>
    <div class="level7"><span class="xref">MaskPatternField</span></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_MaskPatternField_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public sealed class MaskPatternField : MaskField, IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, ISupportInitialize</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public NotInheritable Class MaskPatternField
    Inherits MaskField
    Implements IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, ISupportInitialize</code></pre>
  </div>
  <h5 id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p><a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.html">MaskPatternField</a> support following patterns:
<table><thead><tr><th class="term">Pattern</th><th class="description">Description</th></tr></thead><tbody><tr><td class="term">\Ａ</td><td class="description">\Ａ Upper case DBCS alphabet (A-Z).</td></tr><tr><td class="term">\ａ</td><td class="description">\ａ Lower case DBCS alphabet (a-z).</td></tr><tr><td class="term">\Ｄ</td><td class="description">\Ｄ Matches any DBCS decimal digit. Same as [０-９].</td></tr><tr><td class="term">\Ｂ</td><td class="description">\Ｂ Matches DBCS binary. Same as [０-１].</td></tr><tr><td class="term">\Ｘ</td><td class="description">\Ｘ Matches DBCS hexadecimal. Same as [０-９Ａ-Ｆａ-ｆ].</td></tr><tr><td class="term">\Ｗ</td><td class="description">\Ｗ Matches any DBCS word character. It is same as [ａ-ｚＡ-Ｚ＿０-９].</td></tr><tr><td class="term">\Ｋ</td><td class="description">\Ｋ DBCS Katakana.</td></tr><tr><td class="term">\Ｊ</td><td class="description">\Ｊ Hiragana.</td></tr><tr><td class="term">\Ｚ</td><td class="description">\Ｚ All DBCS characters.</td></tr><tr><td class="term">\Ｎ</td><td class="description">\Ｎ Matches DBCS big Katakana.</td></tr><tr><td class="term">\Ｇ</td><td class="description">\Ｇ Matches DBCS big Hiragana.</td></tr><tr><td class="term">\Ｔ</td><td class="description">\Ｔ Only surrogate char. </td></tr><tr><td class="term">\A</td><td class="description">\A Matches any upper case alphabet [A-Z].</td></tr><tr><td class="term">\a</td><td class="description">\a Matches any lower case alphabet [a-z].</td></tr><tr><td class="term">\D</td><td class="description">\D Matches any decimal digit. Same as [0-9].</td></tr><tr><td class="term">\B</td><td class="description">\B Matches binary. Same as [0-1].</td></tr><tr><td class="term">\X</td><td class="description">\X Matches hexadecimal. Same as [0-9A-Fa-f].</td></tr><tr><td class="term">\W</td><td class="description">\W Matches any word character. It is same as [a-zA-Z_0-9].</td></tr><tr><td class="term">\K</td><td class="description">\K SBCS Katakana.</td></tr><tr><td class="term">\H</td><td class="description">\H Matches all SBCS characters.</td></tr><tr><td class="term">\N</td><td class="description">\N Matches all SBCS big Katakana.</td></tr></tbody></table><div class="NOTE"><h5>note</h5><p>
When user set <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.AutoConvert.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_AutoConvert">AutoConvert</a> to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>, the field doesn't
convert the text into valid chars.
</p></div><p><b>Supported <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.visualstate">VisualState</a> list:</b><table width="50%" cellspacing="2" cellpadding="5" frame="lhs"><tr><th><p>VisualStateGroup Name</p></th><th><p>VisualState Name</p></th><th><p>Description</p></th></tr><tr><td><p>CommonStates</p></td><td><p>Normal</p></td><td><p>Represents the visual appearance when control is in normal state.</p></td></tr><tr><td><p>CommonStates</p></td><td><p>Disabled</p></td><td><p>Represents the visual appearance when <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement.isenabled">IsEnabled</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p></td></tr><tr><td><p>CommonStates</p></td><td><p>MouseOver</p></td><td><p>Represents the visual appearance when <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement.ismouseover">IsMouseOver</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</p></td></tr><tr><td><p>ActiveStates</p></td><td><p>Active</p></td><td><p>Represents the visual appearance when <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsActive.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsActive">IsActive</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</p></td></tr><tr><td><p>ActiveStates</p></td><td><p>Inactive</p></td><td><p>Represents the visual appearance when <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsActive.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsActive">IsActive</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p></td></tr><tr><td><p>InputStates</p></td><td><p>Full</p></td><td><p>Represents the visual appearance when <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsFull.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsFull">IsFull</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</p></td></tr><tr><td><p>InputStates</p></td><td><p>Completed</p></td><td><p>Represents the visual appearance when <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsCompleted.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsCompleted">IsCompleted</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</p></td></tr><tr><td><p>InputStates</p></td><td><p>Empty</p></td><td><p>Represents the visual appearance when <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsEmpty.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsEmpty">IsEmpty</a> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</p></td></tr><tr><td><p>InputStates</p></td><td><p>Part</p></td><td><p>Represents the visual appearance when <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsFull.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsFull">IsFull</a>, <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsCompleted.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsCompleted">IsCompleted</a> and <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.Field.IsEmpty.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_Field_IsEmpty">IsEmpty</a> all are <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p></td></tr><tr><td><p>ValidationStates</p></td><td><p>Valid</p></td><td><p>Represents the visual appearance when <span class="xref">System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject)</span> returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p></td></tr><tr><td><p>ValidationStates</p></td><td><p>InvalidFocused</p></td><td><p>Represents the visual appearance when <span class="xref">System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject)</span> returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> and control has focus.</p></td></tr><tr><td><p>ValidationStates</p></td><td><p>InvalidUnfocused</p></td><td><p>Represents the visual appearance when <span class="xref">System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject)</span> returns <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> and control has no focus.</p></td></tr></table>
</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_MaskPatternField__ctor" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.#ctor">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.-ctor.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField__ctor">MaskPatternField()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.html">MaskPatternField</a> class.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField__ctor_System_String_System_Int32_System_Int32_" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.#ctor(System.String,System.Int32,System.Int32)">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.-ctor.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField__ctor_System_String_System_Int32_System_Int32_">MaskPatternField(string, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.html">MaskPatternField</a> class.</p>
</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_MaskPatternField_AutoConvertProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.AutoConvertProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.AutoConvertProperty.html">AutoConvertProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.MaskPatternField.AutoConvert dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_MaxLengthProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MaxLengthProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MaxLengthProperty.html">MaxLengthProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.MaskPatternField.MaxLength dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_MinLengthProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MinLengthProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MinLengthProperty.html">MinLengthProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.MaskPatternField.MinLength dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_PatternProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.PatternProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.PatternProperty.html">PatternProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.MaskPatternField.Pattern dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_PromptCharProperty" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.PromptCharProperty">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.PromptCharProperty.html">PromptCharProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the GrapeCity.Windows.InputMan.Fields.MaskPatternField.PromptChar dependency property.</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_MaskPatternField_AutoConvert" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.AutoConvert">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.AutoConvert.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_AutoConvert">AutoConvert</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.html">MaskPatternField</a> can auto convert. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_MaxLength" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MaxLength">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MaxLength.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_MaxLength">MaxLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the maximum length of the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.html">MaskPatternField</a>. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_MinLength" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MinLength">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.MinLength.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_MinLength">MinLength</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the minimum length of the <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.html">MaskPatternField</a>. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_Pattern" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.Pattern">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.Pattern.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_Pattern">Pattern</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the pattern of <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.html">MaskPatternField</a>. This is a dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_PromptChar" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.PromptChar">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.PromptChar.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_PromptChar">PromptChar</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the prompt char of the field. This is a dependency property.</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_MaskPatternField_Activate" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.Activate">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.Activate.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_Activate">Activate()</a>
        </td>
        <td class="markdown level1 summary"><p>Attempts to activate current field and put caret to default caret position.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_EndInit" data-uid="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.EndInit">
          <a class="xref" href="GrapeCity.Wpf.SpreadSheet.CellType.Editors.MaskPatternField.EndInit.html#GrapeCity_Wpf_SpreadSheet_CellType_Editors_MaskPatternField_EndInit">EndInit()</a>
        </td>
        <td class="markdown level1 summary"><p>Indicates that the initialization process for the element is complete.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
