IXRTextBlock (Compact 2013)
3/28/2014
This class provides a lightweight control for displaying small amounts of text content.
Syntax
class IXRTextBlock : public IXRFrameworkElement
Inheritance Hierarchy
IXRTextBlock
Methods
Method |
Description |
---|---|
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 text 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 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 the text decorations that are applied to the text inside this text block element. |
|
Retrieves the text trimming behavior to employ when content overflows the content area. |
|
Retrieves a value that indicates how this text block wraps its text. |
|
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 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 the text decorations that are applied to the text inside this text block element. |
|
Sets the text trimming behavior to employ when content overflows the content area. |
|
Sets a value that indicates how this text block wraps its text. |
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
The IXRTextBlock object is the primary element for displaying text in XAML for Windows Embedded-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 XAML 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.
When you create a class instance, use an IXRTextBlockPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
You can also define a text block 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 TextBlock Class on MSDN.
When you set text in a XAML <TextBlock> element instead of using IXRTextBlock to do it, it is not necessary in XAML to explicitly specify the Text property. You can put text in the <TextBlock> element as its content, or as inner text. For more information about how to set a text block in the source XAML for your application, see the Microsoft Silverlight 3 documentation.
.NET Framework Equivalent
System.Windows.Controls.TextBlock
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |