IXRTextBlock (Windows Embedded CE 6.0)
1/6/2010
This class provides a lightweight control for displaying small amounts of text content.
Syntax
class IXRTextBlock : public IXRFrameworkElement
Methods
Method | Description |
---|---|
Retrieves a Brush that provides the background of this text block. |
|
Retrieves the preferred top-level font family for the text in this text block. |
|
Retrieves the font size for the text in this text block. |
|
Retrieves the font source that is applied to this text block for displaying content. |
|
Retrieves a value that indicates how much a font is condensed or expanded on-screen. |
|
Retrieves the font style for the text in this text block. |
|
Retrieves the top-level font weight for this text block. |
|
Retrieves the Brush that paints the text in this text block. |
|
Retrieves the Brush used to paint the background of highlighted text in this text block. |
|
Retrieves the Brush used to paint text that is highlighted in this text block. |
|
Retrieves a value that specifies a set of characters to be highlighted. |
|
Retrieves the collection of inline text elements in this text block. |
|
Retrieves the height of each line of text in this text block. |
|
Retrieves a value that indicates how a line box is determined for each line of text in this text block. |
|
Retrieves a value that indicates the width of padding space between the boundaries of the content area and the content that is displayed by a text block. |
|
Retrieves the text contents of this text block. |
|
Retrieves a value that indicates the horizontal alignment of text content inside this text block. |
|
Retrieves how this text block wraps its text. |
|
Sets the Brush that provides the background of this text block. |
|
Sets the preferred top-level font family for the text in this text block. |
|
Sets the font size for the text in this text block. |
|
Sets the font source that is applied to this text block for displaying text content. |
|
Sets a value that indicates how much a font is condensed or expanded on-screen. |
|
Sets the font style for the text in this text block. |
|
Sets the top-level font weight for this text block. |
|
Sets the Brush to use to paint the text in this text block. |
|
Sets a Brush to use to paint the background of highlighted text in this text block. |
|
Sets the Brush to use to paint text that is highlighted in this text block. |
|
Sets a value that specifies a set of characters to be highlighted. |
|
Sets the collection of inline text elements in this text block. |
|
Sets the height of each line of text in this text block. |
|
Sets a value that indicates how a line box is determined for each line of text in this text block. |
|
Sets a value that indicates the width of padding space between the boundaries of the content area and the content that is displayed by a text block. |
|
Sets the text contents of this text block. |
|
Sets a value that indicates the horizontal alignment of text content inside this text block. |
|
Sets how this text block wraps its text. |
Remarks
The IXRTextBlock object is the primary element for displaying text in Silverlight–based applications.
Note
Leading or trailing white space is not preserved when you set the Text property by calling IXRTextBlock::SetText.
You can align the IXRTextBlock object within the layout of the window by using IXRTextBox::SetTextAlignment, and the inherited methods IXRFrameworkElement::SetVerticalAlignment and IXRFrameworkElement::SetHorizontalAlignment.
The IXRRun and IXRLineBreak objects in the visual tree represent the <Run> and <LineBreak> XAML elements, which are used to render formatted text. These XAML elements are parsed into objects at run time by Silverlight for Windows Embedded. The IXRRun object is a text element that represents a discrete section of formatted or unformatted text. The IXRLineBreak object represents an explicit new line in an IXRTextBlock. If these XAML elements are used to define inner text, the corresponding run-time objects can be accessed from the inlines collection that is retrieved by IXRTextBlock::GetInlines.
You can also define a text block in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.
When you set text in a XAML <TextBlock> element instead of by using IXRTextBlock, it is not necessary in XAML to explicitly specify the Text property. You can put text in the <TextBlock> element as its content, or inner text. For more information about how to set a text block in the source XAML for your application, see the Microsoft Silverlight 2 documentation.
Inheritance Hierarchy
IXRTextBlock
.NET Framework Equivalent
System.Windows.Controls.TextBlock
Requirements
Header | XamlRuntime.h |
sysgen | SYSGEN_XAML_RUNTIME |
Windows Embedded CE | Windows Embedded CE 6.0 R3 |
See Also
Reference
Classes for UI Element Management