C# Class Stride.UI.Controls.EditText

显示文件 Open project: vvvv/stride

Public Properties

Property Type Description
TextChangedEvent RoutedEvent

Private Properties

Property Type Description
EditText System
SetTextInternal void
TextChangedClassHandler void
UpdateTextToDisplay void

Public Methods

Method Description
AppendText ( string textData ) : void

Appends a string to the contents of a text control.

CalculateTextSize ( ) : Vector2

Calculate and returns the size of the Text in virtual pixels size.

Clear ( ) : void

Clears all the content from the text box.

ResetCaretBlinking ( ) : void

Reset the caret blinking to initial state (visible).

Select ( int start, int length, bool caretAtBeginning = false ) : void

Selects a range of text in the text box.

If the value of start is too big the caret is positioned at the end of the current text. If the value of length is too big the selection is extended to the end current text.

SelectAll ( bool caretAtBeginning = false ) : void

Selects all the contents of the text editing control.

Protected Methods

Method Description
ArrangeOverride ( Vector3 finalSizeWithoutMargins ) : Vector3
CalculateTextSize ( string textToMeasure ) : Vector2

Calculate and returns the size of the provided textToMeasure"/> in virtual pixels size.

MeasureOverride ( Vector3 availableSizeWithoutMargins ) : Vector3
OnIsReadOnlyChanged ( ) : void

Function triggered when the value of IsReadOnly changed.

OnMaxLengthChanged ( ) : void

Function triggered when the value of MaxLength changed.

OnMaxLinesChanged ( ) : void

Function triggered when the value of MaxLines changed.

OnMinLinesChanged ( ) : void

Function triggered when the value of MinLines changed.

OnTextChanged ( RoutedEventArgs args ) : void

The class handler of the event TextChanged. This method can be overridden in inherited classes to perform actions common to all instances of a class.

OnTouchDown ( TouchEventArgs args ) : void
OnTouchLeave ( TouchEventArgs args ) : void
OnTouchMove ( TouchEventArgs args ) : void
OnTouchUp ( TouchEventArgs args ) : void
Update ( GameTime time ) : void

Private Methods

Method Description
EditText ( ) : System
SetTextInternal ( string newText, bool updateNativeEdit ) : void
TextChangedClassHandler ( object sender, RoutedEventArgs e ) : void
UpdateTextToDisplay ( ) : void

Method Details

AppendText() public method

Appends a string to the contents of a text control.
public AppendText ( string textData ) : void
textData string A string that specifies the text to append to the current contents of the text control.
return void

ArrangeOverride() protected method

protected ArrangeOverride ( Vector3 finalSizeWithoutMargins ) : Vector3
finalSizeWithoutMargins Vector3
return Vector3

CalculateTextSize() public method

Calculate and returns the size of the Text in virtual pixels size.
public CalculateTextSize ( ) : Vector2
return Vector2

CalculateTextSize() protected method

Calculate and returns the size of the provided textToMeasure"/> in virtual pixels size.
protected CalculateTextSize ( string textToMeasure ) : Vector2
textToMeasure string The text to measure
return Vector2

Clear() public method

Clears all the content from the text box.
public Clear ( ) : void
return void

MeasureOverride() protected method

protected MeasureOverride ( Vector3 availableSizeWithoutMargins ) : Vector3
availableSizeWithoutMargins Vector3
return Vector3

OnIsReadOnlyChanged() protected method

Function triggered when the value of IsReadOnly changed.
protected OnIsReadOnlyChanged ( ) : void
return void

OnMaxLengthChanged() protected method

Function triggered when the value of MaxLength changed.
protected OnMaxLengthChanged ( ) : void
return void

OnMaxLinesChanged() protected method

Function triggered when the value of MaxLines changed.
protected OnMaxLinesChanged ( ) : void
return void

OnMinLinesChanged() protected method

Function triggered when the value of MinLines changed.
protected OnMinLinesChanged ( ) : void
return void

OnTextChanged() protected method

The class handler of the event TextChanged. This method can be overridden in inherited classes to perform actions common to all instances of a class.
protected OnTextChanged ( RoutedEventArgs args ) : void
args RoutedEventArgs The arguments of the event
return void

OnTouchDown() protected method

protected OnTouchDown ( TouchEventArgs args ) : void
args TouchEventArgs
return void

OnTouchLeave() protected method

protected OnTouchLeave ( TouchEventArgs args ) : void
args TouchEventArgs
return void

OnTouchMove() protected method

protected OnTouchMove ( TouchEventArgs args ) : void
args TouchEventArgs
return void

OnTouchUp() protected method

protected OnTouchUp ( TouchEventArgs args ) : void
args TouchEventArgs
return void

ResetCaretBlinking() public method

Reset the caret blinking to initial state (visible).
public ResetCaretBlinking ( ) : void
return void

Select() public method

Selects a range of text in the text box.
If the value of start is too big the caret is positioned at the end of the current text. If the value of length is too big the selection is extended to the end current text.
public Select ( int start, int length, bool caretAtBeginning = false ) : void
start int The zero-based character index of the first character in the selection.
length int The length of the selection, in characters.
caretAtBeginning bool Indicate if the caret should be at the beginning or the end of the selection
return void

SelectAll() public method

Selects all the contents of the text editing control.
public SelectAll ( bool caretAtBeginning = false ) : void
caretAtBeginning bool Indicate if the caret should be at the beginning or the end of the selection
return void

Update() protected method

protected Update ( GameTime time ) : void
time GameTime
return void

Property Details

TextChangedEvent public_oe static_oe property

Identifies the TextChanged routed event.
public static RoutedEvent TextChangedEvent
return RoutedEvent