# C1.WPF.C1EditableContentControl

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_WPF_C1EditableContentControl" data-uid="C1.WPF.C1EditableContentControl" class="text-break">C1EditableContentControl Class
</h1>
  <div class="markdown level0 summary"><p>ContenControl that supports edit mode using a TextBox.</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.threading.dispatcherobject">DispatcherObject</a></div>
    <div class="level2"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.dependencyobject">DependencyObject</a></div>
    <div class="level3"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.media.visual">Visual</a></div>
    <div class="level4"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a></div>
    <div class="level5"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.frameworkelement">FrameworkElement</a></div>
    <div class="level6"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.control">Control</a></div>
    <div class="level7"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.controls.contentcontrol">ContentControl</a></div>
    <div class="level8"><span class="xref">C1EditableContentControl</span></div>
      <div class="level9"><a class="xref" href="C1.WPF.C1TextEditableContentControl.html">C1TextEditableContentControl</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><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.markup.iaddchild">IAddChild</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.html">C1.WPF</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.4.6.2.dll</h6>
  <h5 id="C1_WPF_C1EditableContentControl_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[TemplateVisualState(Name = &quot;MouseOver&quot;, GroupName = &quot;CommonStates&quot;)]
[TemplateVisualState(Name = &quot;Disabled&quot;, GroupName = &quot;CommonStates&quot;)]
[TemplateVisualState(Name = &quot;Normal&quot;, GroupName = &quot;CommonStates&quot;)]
[TemplateVisualState(Name = &quot;Valid&quot;, GroupName = &quot;ValidationStatesStates&quot;)]
[TemplateVisualState(Name = &quot;InvalidUnfocused&quot;, GroupName = &quot;ValidationStatesStates&quot;)]
[TemplateVisualState(Name = &quot;InvalidFocused&quot;, GroupName = &quot;ValidationStatesStates&quot;)]
[StyleTypedProperty(Property = &quot;ValidationDecoratorStyle&quot;, StyleTargetType = typeof(C1ValidationDecorator))]
public abstract class C1EditableContentControl : ContentControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;TemplateVisualState(Name:=&quot;MouseOver&quot;, GroupName:=&quot;CommonStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Disabled&quot;, GroupName:=&quot;CommonStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Normal&quot;, GroupName:=&quot;CommonStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;Valid&quot;, GroupName:=&quot;ValidationStatesStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;InvalidUnfocused&quot;, GroupName:=&quot;ValidationStatesStates&quot;)&gt;
&lt;TemplateVisualState(Name:=&quot;InvalidFocused&quot;, GroupName:=&quot;ValidationStatesStates&quot;)&gt;
&lt;StyleTypedProperty(Property:=&quot;ValidationDecoratorStyle&quot;, StyleTargetType:=GetType(C1ValidationDecorator))&gt;
Public MustInherit Class C1EditableContentControl
    Inherits ContentControl
    Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild</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_C1EditableContentControl__ctor" data-uid="C1.WPF.C1EditableContentControl.#ctor">
          <a class="xref" href="C1.WPF.C1EditableContentControl.-ctor.html#C1_WPF_C1EditableContentControl__ctor">C1EditableContentControl()</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of a <a class="xref" href="C1.WPF.C1EditableContentControl.html">C1EditableContentControl</a>.</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_C1EditableContentControl_ContentControlProperty" data-uid="C1.WPF.C1EditableContentControl.ContentControlProperty">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ContentControlProperty.html">ContentControlProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1EditableContentControl.ContentControl.html#C1_WPF_C1EditableContentControl_ContentControl">ContentControl</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_ContentConverterProperty" data-uid="C1.WPF.C1EditableContentControl.ContentConverterProperty">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ContentConverterProperty.html">ContentConverterProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1EditableContentControl.ContentConverter.html#C1_WPF_C1EditableContentControl_ContentConverter">ContentConverter</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_EditControlProperty" data-uid="C1.WPF.C1EditableContentControl.EditControlProperty">
          <a class="xref" href="C1.WPF.C1EditableContentControl.EditControlProperty.html">EditControlProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1EditableContentControl.EditControl.html#C1_WPF_C1EditableContentControl_EditControl">EditControl</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_IsEditableProperty" data-uid="C1.WPF.C1EditableContentControl.IsEditableProperty">
          <a class="xref" href="C1.WPF.C1EditableContentControl.IsEditableProperty.html">IsEditableProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1EditableContentControl.IsEditable.html#C1_WPF_C1EditableContentControl_IsEditable">IsEditable</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_IsInEditModeProperty" data-uid="C1.WPF.C1EditableContentControl.IsInEditModeProperty">
          <a class="xref" href="C1.WPF.C1EditableContentControl.IsInEditModeProperty.html">IsInEditModeProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1EditableContentControl.IsInEditMode.html#C1_WPF_C1EditableContentControl_IsInEditMode">IsInEditMode</a> dependency property.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_ValidationDecoratorStyleProperty" data-uid="C1.WPF.C1EditableContentControl.ValidationDecoratorStyleProperty">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ValidationDecoratorStyleProperty.html">ValidationDecoratorStyleProperty</a>
        </td>
        <td class="markdown level1 summary"><p>Identifies the <a class="xref" href="C1.WPF.C1EditableContentControl.ValidationDecoratorStyle.html#C1_WPF_C1EditableContentControl_ValidationDecoratorStyle">ValidationDecoratorStyle</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_C1EditableContentControl_ContentControl" data-uid="C1.WPF.C1EditableContentControl.ContentControl">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ContentControl.html#C1_WPF_C1EditableContentControl_ContentControl">ContentControl</a>
        </td>
        <td class="markdown level1 summary"><p>Control visible when it is not in edit mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_ContentConverter" data-uid="C1.WPF.C1EditableContentControl.ContentConverter">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ContentConverter.html#C1_WPF_C1EditableContentControl_ContentConverter">ContentConverter</a>
        </td>
        <td class="markdown level1 summary"><p>Used to create the control content from the edited content.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_EditControl" data-uid="C1.WPF.C1EditableContentControl.EditControl">
          <a class="xref" href="C1.WPF.C1EditableContentControl.EditControl.html#C1_WPF_C1EditableContentControl_EditControl">EditControl</a>
        </td>
        <td class="markdown level1 summary"><p>Control visible when it is in edit mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_IsDirty" data-uid="C1.WPF.C1EditableContentControl.IsDirty">
          <a class="xref" href="C1.WPF.C1EditableContentControl.IsDirty.html#C1_WPF_C1EditableContentControl_IsDirty">IsDirty</a>
        </td>
        <td class="markdown level1 summary"><p>Get or sets whether the element was edited during edit mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_IsEditable" data-uid="C1.WPF.C1EditableContentControl.IsEditable">
          <a class="xref" href="C1.WPF.C1EditableContentControl.IsEditable.html#C1_WPF_C1EditableContentControl_IsEditable">IsEditable</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/set if the control can be edited.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_IsInEditMode" data-uid="C1.WPF.C1EditableContentControl.IsInEditMode">
          <a class="xref" href="C1.WPF.C1EditableContentControl.IsInEditMode.html#C1_WPF_C1EditableContentControl_IsInEditMode">IsInEditMode</a>
        </td>
        <td class="markdown level1 summary"><p>Gets/sets when the control enters in edit mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_ValidationDecoratorStyle" data-uid="C1.WPF.C1EditableContentControl.ValidationDecoratorStyle">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ValidationDecoratorStyle.html#C1_WPF_C1EditableContentControl_ValidationDecoratorStyle">ValidationDecoratorStyle</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the style that is applied to the inner <a class="xref" href="C1.WPF.C1ValidationDecorator.html">C1ValidationDecorator</a>.</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_C1EditableContentControl_ChangeVisualStateCommon_System_Boolean_" data-uid="C1.WPF.C1EditableContentControl.ChangeVisualStateCommon(System.Boolean)">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ChangeVisualStateCommon.html#C1_WPF_C1EditableContentControl_ChangeVisualStateCommon_System_Boolean_">ChangeVisualStateCommon(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>Updates the current visual state of the Common visual state group to match the object's properties.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnApplyTemplate" data-uid="C1.WPF.C1EditableContentControl.OnApplyTemplate">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnApplyTemplate.html#C1_WPF_C1EditableContentControl_OnApplyTemplate">OnApplyTemplate()</a>
        </td>
        <td class="markdown level1 summary"><p>Builds the visual tree for the <a class="xref" href="C1.WPF.C1EditableContentControl.html">C1EditableContentControl</a> control when a new template is applied.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnContentChanged_System_Object_System_Object_" data-uid="C1.WPF.C1EditableContentControl.OnContentChanged(System.Object,System.Object)">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnContentChanged.html#C1_WPF_C1EditableContentControl_OnContentChanged_System_Object_System_Object_">OnContentChanged(object, object)</a>
        </td>
        <td class="markdown level1 summary"><p>Called when the value of the <span class="xref">Content</span> property changes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnEditCanceled" data-uid="C1.WPF.C1EditableContentControl.OnEditCanceled">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnEditCanceled.html#C1_WPF_C1EditableContentControl_OnEditCanceled">OnEditCanceled()</a>
        </td>
        <td class="markdown level1 summary"><p>Fires the <span class="xref">C1.Silverlight.C1EditableContentControl.EditCanceled</span> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnEditCompleted" data-uid="C1.WPF.C1EditableContentControl.OnEditCompleted">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnEditCompleted.html#C1_WPF_C1EditableContentControl_OnEditCompleted">OnEditCompleted()</a>
        </td>
        <td class="markdown level1 summary"><p>Fires the <span class="xref">C1.Silverlight.C1EditableContentControl.EditCompleted</span> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnEditStarted" data-uid="C1.WPF.C1EditableContentControl.OnEditStarted">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnEditStarted.html#C1_WPF_C1EditableContentControl_OnEditStarted">OnEditStarted()</a>
        </td>
        <td class="markdown level1 summary"><p>Fires the <span class="xref">C1.Silverlight.C1EditableContentControl.EditStarted</span> event.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnIsEditableChanged_System_Boolean_" data-uid="C1.WPF.C1EditableContentControl.OnIsEditableChanged(System.Boolean)">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnIsEditableChanged.html#C1_WPF_C1EditableContentControl_OnIsEditableChanged_System_Boolean_">OnIsEditableChanged(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>The IsEditable value has changed.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnIsInEditModeChanged_System_Boolean_" data-uid="C1.WPF.C1EditableContentControl.OnIsInEditModeChanged(System.Boolean)">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnIsInEditModeChanged.html#C1_WPF_C1EditableContentControl_OnIsInEditModeChanged_System_Boolean_">OnIsInEditModeChanged(bool)</a>
        </td>
        <td class="markdown level1 summary"><p>The control has changed the mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_" data-uid="C1.WPF.C1EditableContentControl.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)">
          <a class="xref" href="C1.WPF.C1EditableContentControl.OnPropertyChanged.html#C1_WPF_C1EditableContentControl_OnPropertyChanged_System_Windows_DependencyPropertyChangedEventArgs_">OnPropertyChanged(DependencyPropertyChangedEventArgs)</a>
        </td>
        <td class="markdown level1 summary"><p>Invoked whenever the effective value of any dependency property has been updated.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_ShouldEnterEditModeOnKeyDown_System_Windows_Input_Key_" data-uid="C1.WPF.C1EditableContentControl.ShouldEnterEditModeOnKeyDown(System.Windows.Input.Key)">
          <a class="xref" href="C1.WPF.C1EditableContentControl.ShouldEnterEditModeOnKeyDown.html#C1_WPF_C1EditableContentControl_ShouldEnterEditModeOnKeyDown_System_Windows_Input_Key_">ShouldEnterEditModeOnKeyDown(Key)</a>
        </td>
        <td class="markdown level1 summary"><p>Called to define if the control has to enter edit mode when a particular key is pressed.
For example: arrow keys might not change to edit mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_UpdateVisualState" data-uid="C1.WPF.C1EditableContentControl.UpdateVisualState">
          <a class="xref" href="C1.WPF.C1EditableContentControl.UpdateVisualState.html#C1_WPF_C1EditableContentControl_UpdateVisualState">UpdateVisualState()</a>
        </td>
        <td class="markdown level1 summary"><p>Update the visual state of this control</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_C1EditableContentControl_EditCanceled" data-uid="C1.WPF.C1EditableContentControl.EditCanceled">
          <a class="xref" href="C1.WPF.C1EditableContentControl.EditCanceled.html">EditCanceled</a>
        </td>
        <td class="markdown level1 summary"><p>Fired when the user exits edit mode without changes.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_EditCompleted" data-uid="C1.WPF.C1EditableContentControl.EditCompleted">
          <a class="xref" href="C1.WPF.C1EditableContentControl.EditCompleted.html">EditCompleted</a>
        </td>
        <td class="markdown level1 summary"><p>Fired when the user has completed the edits.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_EditStarted" data-uid="C1.WPF.C1EditableContentControl.EditStarted">
          <a class="xref" href="C1.WPF.C1EditableContentControl.EditStarted.html">EditStarted</a>
        </td>
        <td class="markdown level1 summary"><p>Fired when the control enters edit mode.</p>
</td>
      </tr>
      <tr>
        <td id="C1_WPF_C1EditableContentControl_IsMouseOverChanged" data-uid="C1.WPF.C1EditableContentControl.IsMouseOverChanged">
          <a class="xref" href="C1.WPF.C1EditableContentControl.IsMouseOverChanged.html">IsMouseOverChanged</a>
        </td>
        <td class="markdown level1 summary"><p>Event raised when the <span class="xref">IsMouseOver</span> property has changed.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="C1.WPF.Extensions.FindParent.html#C1_WPF_Extensions_FindParent__1_System_Windows_FrameworkElement_">Extensions.FindParent&lt;T&gt;(FrameworkElement)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.GetAllParents.html#C1_WPF_Extensions_GetAllParents_System_Windows_FrameworkElement_">Extensions.GetAllParents(FrameworkElement)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.GetVisualStateGroup.html#C1_WPF_Extensions_GetVisualStateGroup_System_Windows_FrameworkElement_System_String_">Extensions.GetVisualStateGroup(FrameworkElement, string)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___">Extensions.SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.SetBinding.html#C1_WPF_Extensions_SetBinding__1_System_Windows_FrameworkElement_System_Windows_DependencyProperty___0_System_Linq_Expressions_Expression_System_Func___0_System_Object___System_Windows_Data_IValueConverter_">Extensions.SetBinding&lt;T&gt;(FrameworkElement, DependencyProperty, T, Expression&lt;Func&lt;T, object&gt;&gt;, IValueConverter)</a>
  </div>
  <div>
      <a class="xref" href="C1.WPF.Extensions.C1TransformToVisual.html#C1_WPF_Extensions_C1TransformToVisual_System_Windows_UIElement_System_Windows_UIElement_">Extensions.C1TransformToVisual(UIElement, UIElement)</a>
  </div>

</div>
