Class RadWatermarkTextBox
This class represents a TextBox that shows a different content when empty and not focused.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.dll
Syntax
[TelerikToolboxCategory("Input")]
public class RadWatermarkTextBox : TextBox, IThemable
Constructors
RadWatermarkTextBox()
Initializes a new instance of the RadWatermarkTextBox class.
Declaration
public RadWatermarkTextBox()
Fields
AdditionalContentProperty
Identifies the AdditionalContent property.
Declaration
public static readonly DependencyProperty AdditionalContentProperty
Field Value
System.Windows.DependencyProperty
|
AdditionalContentTemplateProperty
Identifies the AdditionalContentTemplate property.
Declaration
public static readonly DependencyProperty AdditionalContentTemplateProperty
Field Value
System.Windows.DependencyProperty
|
CurrentTextProperty
Identifies the CurrentText dependency property.
Declaration
public static readonly DependencyProperty CurrentTextProperty
Field Value
System.Windows.DependencyProperty
|
DisabledBackgroundProperty
Identifies the DisabledBackground property.
Declaration
public static readonly DependencyProperty DisabledBackgroundProperty
Field Value
System.Windows.DependencyProperty
|
IsWatermarkVisibleProperty
Identifies the IsWatermarkVisible dependency property.
Declaration
public static readonly DependencyProperty IsWatermarkVisibleProperty
Field Value
System.Windows.DependencyProperty
|
ReadOnlyBackgroundProperty
Identifies the ReadOnlyBackground property.
Declaration
public static readonly DependencyProperty ReadOnlyBackgroundProperty
Field Value
System.Windows.DependencyProperty
|
SelectionOnFocusProperty
Identifies the SelectionOnFocus property.
Declaration
public static readonly DependencyProperty SelectionOnFocusProperty
Field Value
System.Windows.DependencyProperty
|
WatermarkBehaviorProperty
Identifies the WatermarkBehavior property.
Declaration
public static readonly DependencyProperty WatermarkBehaviorProperty
Field Value
System.Windows.DependencyProperty
|
WatermarkContentProperty
Identifies the WatermarkContent dependency property.
Declaration
public static readonly DependencyProperty WatermarkContentProperty
Field Value
System.Windows.DependencyProperty
|
WatermarkTemplateProperty
Identifies the WatermarkTemplate dependency property.
Declaration
public static readonly DependencyProperty WatermarkTemplateProperty
Field Value
System.Windows.DependencyProperty
|
Properties
AdditionalContent
Gets or sets an object which is rendered in ContentPresenter in the right part of the control.
Declaration
public object AdditionalContent { get; set; }
Property Value
System.Object
|
AdditionalContentTemplate
Gets or sets the System.Windows.DataTemplate used for the AdditionalContent object.
Declaration
public DataTemplate AdditionalContentTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
CurrentText
Gets or sets the text of the TextBox. This property is meant to be used for TwoWay binding in order to be updated on each change of the text and not when the focus is lost.
Declaration
public string CurrentText { get; set; }
Property Value
System.String
|
DisabledBackground
Gets a value that specifies the background of the control when in disabled state.
Declaration
public Brush DisabledBackground { get; set; }
Property Value
System.Windows.Media.Brush
|
IsWatermarkVisible
Gets a value indicating whether the Watermark is visible or not.
Declaration
public bool IsWatermarkVisible { get; }
Property Value
System.Boolean
|
ReadOnlyBackground
Gets a value that specifies the background of the control when in readonly state.
Declaration
public Brush ReadOnlyBackground { get; set; }
Property Value
System.Windows.Media.Brush
|
SelectionOnFocus
Specifies the modification over the selection when the control receives focus.
Declaration
public SelectionOnFocus SelectionOnFocus { get; set; }
Property Value
SelectionOnFocus
|
WatermarkBehavior
Gets a value that specifies when the watermark content of control will be hidden.
Declaration
public WatermarkBehavior WatermarkBehavior { get; set; }
Property Value
WatermarkBehavior
|
WatermarkContent
Gets or sets the content to be shown when the TextBox is empty and not focused.
Declaration
public object WatermarkContent { get; set; }
Property Value
System.Object
|
WatermarkTemplate
Gets or sets the template for presenting the content, shown when the TextBox is empty and not focused.
Declaration
public DataTemplate WatermarkTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
Methods
HandleClear()
Called, when the Clear command is invoked.
Declaration
protected virtual void HandleClear()
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate(). In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|