# C1.WPF.Input.C1MaskedTextBox

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_Input_C1MaskedTextBox" data-uid="C1.WPF.Input.C1MaskedTextBox" class="text-break">C1MaskedTextBox Class
</h1>
  <div class="markdown level0 summary"><p>Represents a control that uses a mask to prevent users from entering invalid data.</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="https://learn.microsoft.com/dotnet/api/system.windows.controls.primitives.textboxbase">TextBoxBase</a></div>
    <div class="level6"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.textbox">TextBox</a></div>
    <div class="level7"><span class="xref">C1TextBoxBase</span></div>
    <div class="level8"><a class="xref" href="C1.WPF.Input.C1TextBox.html">C1TextBox</a></div>
    <div class="level9"><span class="xref">C1MaskedTextBox</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.componentmodel.isupportinitialize">ISupportInitialize</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.windows.markup.iaddchild">IAddChild</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged">INotifyPropertyChanged</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><span class="xref">IDependencyObject</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.Input.html">C1.WPF.Input</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.Input.dll</h6>
  <h5 id="C1_WPF_Input_C1MaskedTextBox_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class C1MaskedTextBox : C1TextBox, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, INotifyPropertyChanged, IDisposable, IDependencyObject</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class C1MaskedTextBox
    Inherits C1TextBox
    Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, INotifyPropertyChanged, IDisposable, IDependencyObject</code></pre>
  </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="C1_WPF_Input_C1MaskedTextBox__ctor" data-uid="C1.WPF.Input.C1MaskedTextBox.#ctor">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.-ctor.html#C1_WPF_Input_C1MaskedTextBox__ctor">C1MaskedTextBox()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.html">C1MaskedTextBox</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="C1_WPF_Input_C1MaskedTextBox_CultureProperty" data-uid="C1.WPF.Input.C1MaskedTextBox.CultureProperty">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.CultureProperty.html">CultureProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Culture.html#C1_WPF_Input_C1MaskedTextBox_Culture">Culture</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_MaskProperty" data-uid="C1.WPF.Input.C1MaskedTextBox.MaskProperty">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.MaskProperty.html">MaskProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Mask.html#C1_WPF_Input_C1MaskedTextBox_Mask">Mask</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_PromptCharProperty" data-uid="C1.WPF.Input.C1MaskedTextBox.PromptCharProperty">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.PromptCharProperty.html">PromptCharProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.PromptChar.html#C1_WPF_Input_C1MaskedTextBox_PromptChar">PromptChar</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_ReplaceModeProperty" data-uid="C1.WPF.Input.C1MaskedTextBox.ReplaceModeProperty">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.ReplaceModeProperty.html">ReplaceModeProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.ReplaceMode.html#C1_WPF_Input_C1MaskedTextBox_ReplaceMode">ReplaceMode</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_TextMaskFormatProperty" data-uid="C1.WPF.Input.C1MaskedTextBox.TextMaskFormatProperty">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.TextMaskFormatProperty.html">TextMaskFormatProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.TextMaskFormat.html#C1_WPF_Input_C1MaskedTextBox_TextMaskFormat">TextMaskFormat</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_ValueProperty" data-uid="C1.WPF.Input.C1MaskedTextBox.ValueProperty">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.ValueProperty.html">ValueProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Value.html#C1_WPF_Input_C1MaskedTextBox_Value">Value</a> 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="C1_WPF_Input_C1MaskedTextBox_Culture" data-uid="C1.WPF.Input.C1MaskedTextBox.Culture">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Culture.html#C1_WPF_Input_C1MaskedTextBox_Culture">Culture</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the culture used to display the value in the <span class="xref">C1.WPF.C1MaskedTextBox</span>.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_IsValid" data-uid="C1.WPF.Input.C1MaskedTextBox.IsValid">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.IsValid.html#C1_WPF_Input_C1MaskedTextBox_IsValid">IsValid</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a value that determines whether the control contains a valid entry.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_Mask" data-uid="C1.WPF.Input.C1MaskedTextBox.Mask">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Mask.html#C1_WPF_Input_C1MaskedTextBox_Mask">Mask</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the input mask.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_PromptChar" data-uid="C1.WPF.Input.C1MaskedTextBox.PromptChar">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.PromptChar.html#C1_WPF_Input_C1MaskedTextBox_PromptChar">PromptChar</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the character used to show spaces where user is supposed to type.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_ReplaceMode" data-uid="C1.WPF.Input.C1MaskedTextBox.ReplaceMode">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.ReplaceMode.html#C1_WPF_Input_C1MaskedTextBox_ReplaceMode">ReplaceMode</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether new characters will be inserted or replace existing ones while you are typing.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_TextMaskFormat" data-uid="C1.WPF.Input.C1MaskedTextBox.TextMaskFormat">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.TextMaskFormat.html#C1_WPF_Input_C1MaskedTextBox_TextMaskFormat">TextMaskFormat</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value that determines whether literals and prompt characters are included in the Value property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_Value" data-uid="C1.WPF.Input.C1MaskedTextBox.Value">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Value.html#C1_WPF_Input_C1MaskedTextBox_Value">Value</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the formatted content of the control as specified by the TextMaskFormat 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="C1_WPF_Input_C1MaskedTextBox_Dispose_System_Boolean_" data-uid="C1.WPF.Input.C1MaskedTextBox.Dispose(System.Boolean)">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Dispose.html#C1_WPF_Input_C1MaskedTextBox_Dispose_System_Boolean_">Dispose(bool)</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_OnApplyTemplate" data-uid="C1.WPF.Input.C1MaskedTextBox.OnApplyTemplate">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.OnApplyTemplate.html#C1_WPF_Input_C1MaskedTextBox_OnApplyTemplate">OnApplyTemplate()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_OnMaskedTextChanged_C1_WPF_Input_MaskedTextChangedEventArgs_" data-uid="C1.WPF.Input.C1MaskedTextBox.OnMaskedTextChanged(C1.WPF.Input.MaskedTextChangedEventArgs)">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.OnMaskedTextChanged.html#C1_WPF_Input_C1MaskedTextBox_OnMaskedTextChanged_C1_WPF_Input_MaskedTextChangedEventArgs_">OnMaskedTextChanged(MaskedTextChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when consistent content that conforms to the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Mask.html#C1_WPF_Input_C1MaskedTextBox_Mask">Mask</a> changes in the text box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_UpdateValue" data-uid="C1.WPF.Input.C1MaskedTextBox.UpdateValue">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.UpdateValue.html#C1_WPF_Input_C1MaskedTextBox_UpdateValue">UpdateValue()</a>
        </td>
        <td class="markdown level1 summary"><p>Forces <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.html">C1MaskedTextBox</a> to update its <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Value.html#C1_WPF_Input_C1MaskedTextBox_Value">Value</a> and Text properties when the control is not loaded.
Does nothing in WPF.</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="C1_WPF_Input_C1MaskedTextBox_MaskedTextChanged" data-uid="C1.WPF.Input.C1MaskedTextBox.MaskedTextChanged">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.MaskedTextChanged.html">MaskedTextChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when consistent content that conforms to the <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Mask.html#C1_WPF_Input_C1MaskedTextBox_Mask">Mask</a> changes in the text box.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_Input_C1MaskedTextBox_ValueChanged" data-uid="C1.WPF.Input.C1MaskedTextBox.ValueChanged">
          <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.ValueChanged.html">ValueChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Occurs when <a class="xref" href="C1.WPF.Input.C1MaskedTextBox.Value.html#C1_WPF_Input_C1MaskedTextBox_Value">Value</a> changed.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
