C# Class Microsoft.Phone.Controls.PhoneTextBox

Inheritance: System.Windows.Controls.TextBox
Exibir arquivo Open project: Kinnara/WPToolkit Class Usage Examples

Public Properties

Property Type Description
ActionIconProperty System.Windows.DependencyProperty
ActualHintVisibilityProperty System.Windows.DependencyProperty
DisplayedMaxLengthProperty System.Windows.DependencyProperty
HidesActionItemWhenEmptyProperty System.Windows.DependencyProperty
HintProperty System.Windows.DependencyProperty
HintStyleProperty System.Windows.DependencyProperty
LengthIndicatorThresholdProperty System.Windows.DependencyProperty
LengthIndicatorVisibleProperty System.Windows.DependencyProperty

Public Methods

Method Description
OnApplyTemplate ( ) : void

Applies the template and checks to see if the Hint should be shown when the page is first loaded.

PhoneTextBox ( ) : System

Initializes a new instance of the PhoneTextBox class.

Protected Methods

Method Description
OnGotFocus ( RoutedEventArgs e ) : void

Override the Focus event to hide the Hint.

OnLostFocus ( RoutedEventArgs e ) : void

Override the Blur/LostFocus event to show the Hint if needed.

Private Methods

Method Description
DisplayedMaxLengthChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnActionIconChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnActionIconTapped ( object sender, RoutedEventArgs e ) : void

Determines if the developer set an event for ActionIconTapped.

OnHintPropertyChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void

When the Hint is changed, check if it needs to be hidden or shown.

OnLengthIndicatorThresholdChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnTextChanged ( object sender, RoutedEventArgs e ) : void

Called when the selection changed event occurs. This determines whether the length indicator should be shown or not and if the TextBox needs to grow.

ResizeTextBox ( ) : void
UpdateActionIconVisibility ( ) : void
UpdateHintVisibility ( ) : void

Determines if the Hint should be shown or not based on if there is content in the TextBox.

UpdateLengthIndicatorVisibility ( ) : void

Method Details

OnApplyTemplate() public method

Applies the template and checks to see if the Hint should be shown when the page is first loaded.
public OnApplyTemplate ( ) : void
return void

OnGotFocus() protected method

Override the Focus event to hide the Hint.
protected OnGotFocus ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs Event arguments.
return void

OnLostFocus() protected method

Override the Blur/LostFocus event to show the Hint if needed.
protected OnLostFocus ( RoutedEventArgs e ) : void
e System.Windows.RoutedEventArgs Event arguments.
return void

PhoneTextBox() public method

Initializes a new instance of the PhoneTextBox class.
public PhoneTextBox ( ) : System
return System

Property Details

ActionIconProperty public_oe static_oe property

Identifies the ActionIcon DependencyProperty.
public static DependencyProperty,System.Windows ActionIconProperty
return System.Windows.DependencyProperty

ActualHintVisibilityProperty public_oe static_oe property

Identifies the HintVisibility DependencyProperty
public static DependencyProperty,System.Windows ActualHintVisibilityProperty
return System.Windows.DependencyProperty

DisplayedMaxLengthProperty public_oe static_oe property

The displayed maximum length of text that can be entered. This value takes priority over the MaxLength property in the Length Indicator display.
public static DependencyProperty,System.Windows DisplayedMaxLengthProperty
return System.Windows.DependencyProperty

HidesActionItemWhenEmptyProperty public_oe static_oe property

Identifies the HidesActionItemWhenEmpty DependencyProperty.
public static DependencyProperty,System.Windows HidesActionItemWhenEmptyProperty
return System.Windows.DependencyProperty

HintProperty public_oe static_oe property

Identifies the Hint DependencyProperty.
public static DependencyProperty,System.Windows HintProperty
return System.Windows.DependencyProperty

HintStyleProperty public_oe static_oe property

Identifies the HintStyle DependencyProperty.
public static DependencyProperty,System.Windows HintStyleProperty
return System.Windows.DependencyProperty

LengthIndicatorThresholdProperty public_oe static_oe property

Length Indicator Visibility Threshold Dependency Property.
public static DependencyProperty,System.Windows LengthIndicatorThresholdProperty
return System.Windows.DependencyProperty

LengthIndicatorVisibleProperty public_oe static_oe property

Length Indicator Visibile Dependency Property.
public static DependencyProperty,System.Windows LengthIndicatorVisibleProperty
return System.Windows.DependencyProperty