Dual control that provides a TextBox on edit mode, and a ContentControl on readonly mode.

Namespace:  C1.WPF
Assembly:  C1.WPF (in C1.WPF.dll)

Syntax

C#
[TemplateVisualStateAttribute(Name = "Valid", GroupName = "ValidationStatesStates")]
[TemplateVisualStateAttribute(Name = "Unwatermarked", GroupName = "WatermarkStates")]
[TemplateVisualStateAttribute(Name = "Watermarked", GroupName = "WatermarkStates")]
[TemplateVisualStateAttribute(Name = "InvalidUnfocused", GroupName = "ValidationStatesStates")]
[TemplatePartAttribute(Name = "EditControl", Type = typeof(C1TextBoxBase))]
[TemplatePartAttribute(Name = "ContentControl", Type = typeof(ContentPresenter))]
[TemplateVisualStateAttribute(Name = "InvalidFocused", GroupName = "ValidationStatesStates")]
[StyleTypedPropertyAttribute(Property = "ValidationDecoratorStyle", StyleTargetType = typeof(C1ValidationDecorator))]
public class C1TextEditableContentControl : C1EditableContentControl
Visual Basic
<TemplateVisualStateAttribute(Name := "Valid", GroupName := "ValidationStatesStates")> _
<TemplateVisualStateAttribute(Name := "Unwatermarked", GroupName := "WatermarkStates")> _
<TemplateVisualStateAttribute(Name := "Watermarked", GroupName := "WatermarkStates")> _
<TemplateVisualStateAttribute(Name := "InvalidUnfocused", GroupName := "ValidationStatesStates")> _
<TemplatePartAttribute(Name := "EditControl", Type := GetType(C1TextBoxBase))> _
<TemplatePartAttribute(Name := "ContentControl", Type := GetType(ContentPresenter))> _
<TemplateVisualStateAttribute(Name := "InvalidFocused", GroupName := "ValidationStatesStates")> _
<StyleTypedPropertyAttribute(Property := "ValidationDecoratorStyle", StyleTargetType := GetType(C1ValidationDecorator))> _
Public Class C1TextEditableContentControl _
	Inherits C1EditableContentControl

Inheritance Hierarchy

System..::..Object
  System.Windows.Threading..::..DispatcherObject
    System.Windows..::..DependencyObject
      System.Windows.Media..::..Visual
        System.Windows..::..UIElement
          System.Windows..::..FrameworkElement
            System.Windows.Controls..::..Control
              System.Windows.Controls..::..ContentControl
                C1.WPF..::..C1EditableContentControl
                  C1.WPF..::..C1TextEditableContentControl

See Also