IXRTextBox (Compact 2013)
3/28/2014
This class represents a control that can be used to display single format, multiline text.
Syntax
class IXRTextBox : public IXRControl
Inheritance Hierarchy
IXRTextBox
Methods
Method |
Description |
---|---|
Attaches a delegate to the SelectionChanged event for this text box. When the text box raises the SelectionChanged event, this delegate is invoked. |
|
Attaches a delegate to the TextChanged event for this text box. When the text box raises the TextChanged event, this delegate is invoked. |
|
Retrieves a value that determines whether this text box allows for and displays the new-line character or return character. |
|
Gets the brush that is used to render the vertical bar that indicates the insertion point in this text box. |
|
Retrieves the font source that is applied to this text box for displaying content. |
|
Retrieves a value that indicates the visibility of the horizontal scroll bar. |
|
Retrieves a value that determines whether the user can change the text in this text box. |
|
Retrieves the value that determines the maximum number of characters allowed for user input. |
|
Retrieves the content of the current selection in this text box. |
|
Retrieves the brush that fills the background of the selected text in this text box. |
|
Retrieves the brush used for the selected text in this text box. |
|
Retrieves the number of characters in the current selection in this text box. |
|
Retrieves the starting position of the text selected in this text box. |
|
Retrieves the text contents of this text box. |
|
Retrieves a value that indicates the horizontal alignment of text inside this text box. |
|
Retrieves a value that indicates how line breaking occurs if a line of text extends beyond the available width of this text box. |
|
Retrieves a value that indicates the visibility of the vertical scroll bar. |
|
Removes a delegate from the SelectionChanged event for this text box. |
|
Removes a delegate from the TextChanged event for this text box. |
|
Selects a range of text in this text box. |
|
Selects all the contents of this text box. |
|
Sets a value that determines whether this text box allows for and displays the new line character or return character. These characters are used to divide text into multiple lines. |
|
Sets the brush that is used to render the vertical bar that indicates the insertion point in this text box. |
|
Sets the font source that is applied to this text box for displaying content. |
|
Sets a value that determines the visibility of the horizontal scroll bar. |
|
Sets a value that determines whether the user can change the text in this text box. |
|
Sets a value that determines the maximum number of characters allowed for user input. |
|
Sets the content of the current selection in this text box. |
|
Sets the brush that fills the background of the selected text in this text box. |
|
Sets the brush used for the selected text in this text box. |
|
Sets the number of characters in the current selection in this text box. |
|
Sets the starting position of the text selected in this text box. |
|
Sets the text contents of this text box. |
|
Sets a value that indicates the horizontal alignment of text inside this text box. |
|
Sets a value that determines how line breaking occurs if a line of text extends beyond the available width of this text box. |
|
Sets a value that determines the visibility of the vertical scroll bar. |
Thread Safety
Members of this class are thread safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.
Remarks
You can enable multiline text in a text box control by using IXRTextBox::SetAcceptsReturn.
You might want to use a text box to display text, but you might not want users to be able to edit the text. To prevent users from doing this, you can call IXRTextBox::SetIsReadOnly. If you pass in true to this method, edit commands are not supported, and the KeyUp and KeyDown events are specified as handled.
If you must have formatted text that cannot be edited by the user, use the IXRTextBlock class instead. If you must have an editable text box that accepts passwords or other input, use the IXRPasswordBox class instead.
You can modify the border of a text box by using the inherited methods IXRControl::SetBorderThickness and IXRControl::SetBorderBrush.
When you create a class instance, use an IXRTextBoxPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
You can also define a text box control in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the TextBox Class on MSDN.
.NET Framework Equivalent
System.Windows.Controls.TextBox
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |