C# Class ModernWPF.TextBoxUI

Contains various attached properties for TextBox and PasswordBox using the modern theme.
Inheritance: System.Windows.DependencyObject
Show file Open project: soukoku/ModernWPF

Public Properties

Property Type Description
LeadingElementProperty System.Windows.DependencyProperty
ShowClearButtonProperty System.Windows.DependencyProperty
TrailingElementProperty System.Windows.DependencyProperty
WatermarkTextProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetLeadingElement ( DependencyObject obj ) : UIElement

Gets the text box leading element.

GetShowClearButton ( DependencyObject obj ) : bool

Gets the show clear button flag.

GetTrailingElement ( DependencyObject obj ) : UIElement

Gets the text box trailing element.

GetWatermarkText ( DependencyObject obj ) : string

Gets the text box water mark text.

SetLeadingElement ( DependencyObject obj, UIElement value ) : void

Sets the text box leading element.

SetShowClearButton ( DependencyObject obj, bool value ) : void

Sets the show clear button flag.

SetTrailingElement ( DependencyObject obj, UIElement value ) : void

Sets the text box trailing element.

SetWatermarkText ( DependencyObject obj, string value ) : void

Sets the text box water mark text.

Private Methods

Method Description
WatermarkChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
pb_PasswordChanged ( object sender, RoutedEventArgs e ) : void

Method Details

GetLeadingElement() public static method

Gets the text box leading element.
public static GetLeadingElement ( DependencyObject obj ) : UIElement
obj System.Windows.DependencyObject The object.
return UIElement

GetShowClearButton() public static method

Gets the show clear button flag.
public static GetShowClearButton ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject The object.
return bool

GetTrailingElement() public static method

Gets the text box trailing element.
public static GetTrailingElement ( DependencyObject obj ) : UIElement
obj System.Windows.DependencyObject The object.
return UIElement

GetWatermarkText() public static method

Gets the text box water mark text.
public static GetWatermarkText ( DependencyObject obj ) : string
obj System.Windows.DependencyObject The object.
return string

SetLeadingElement() public static method

Sets the text box leading element.
public static SetLeadingElement ( DependencyObject obj, UIElement value ) : void
obj System.Windows.DependencyObject The object.
value UIElement The value.
return void

SetShowClearButton() public static method

Sets the show clear button flag.
public static SetShowClearButton ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject The object.
value bool the flag value.
return void

SetTrailingElement() public static method

Sets the text box trailing element.
public static SetTrailingElement ( DependencyObject obj, UIElement value ) : void
obj System.Windows.DependencyObject The object.
value UIElement The value.
return void

SetWatermarkText() public static method

Sets the text box water mark text.
public static SetWatermarkText ( DependencyObject obj, string value ) : void
obj System.Windows.DependencyObject The object.
value string The value.
return void

Property Details

LeadingElementProperty public static property

The DP on a text box in modern theme that contains a leading element (e.g. a search icon).
public static DependencyProperty,System.Windows LeadingElementProperty
return System.Windows.DependencyProperty

ShowClearButtonProperty public static property

The DP flag on whether to show clear text button in a textbox in modern theme.
public static DependencyProperty,System.Windows ShowClearButtonProperty
return System.Windows.DependencyProperty

TrailingElementProperty public static property

The DP on a text box in modern theme that contains a trailing element (e.g. a search icon).
public static DependencyProperty,System.Windows TrailingElementProperty
return System.Windows.DependencyProperty

WatermarkTextProperty public static property

The DP on a text box in modern theme that shows this watermark when empty.
public static DependencyProperty,System.Windows WatermarkTextProperty
return System.Windows.DependencyProperty