次の方法で共有


IXRTextElement (Compact 2013)

3/28/2014

This class provides a base class for the IXRInline class.

Syntax

class IXRTextElement : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

    IXRTextElement

        IXRInline

            IXRLineBreak

            IXRRun

Methods

Method

Description

IXRTextElement::GetFontFamily

Retrieves the preferred top-level font family for the text in this text element.

IXRTextElement::GetFontSize

Retrieves the font size for the text in this text element.

IXRTextElement::GetFontStretch

Retrieves a value that indicates how much a font is condensed or expanded on the screen.

IXRTextElement::GetFontStyle

Retrieves the font style for the text in this text element.

IXRTextElement::GetFontWeight

Retrieves the top-level font weight for this text element.

IXRTextElement::GetForeground

Retrieves the brush that paints the text in this text element.

IXRTextElement::GetLanguage

Retrieves the language of the content within an IXRTextElement element.

IXRTextElement::GetTextDecorations

Retrieves the decorations that are applied to the text inside this text element.

IXRTextElement::SetFontFamily

Sets the preferred top-level font family for the text in this text element.

IXRTextElement::SetFontSize

Sets the font size for the text in this text element.

IXRTextElement::SetFontStretch

Sets a value that indicates how much a font is condensed or expanded on the screen.

IXRTextElement::SetFontStyle

Sets the font style for the text in this text element.

IXRTextElement::SetFontWeight

Sets the top-level font weight for this text element.

IXRTextElement::SetForeground

Sets the brush that paints the text in this text element.

IXRTextElement::SetLanguage

Sets the language of the content within an IXRTextElement element.

IXRTextElement::SetTextDecorations

Sets the decorations that are applied to the text inside this text element.

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 methods of the IXRTextElement class are used to style text in the classes that derive from IXRInline.

If you set a font (either in XAML or C++) that is not supported, XAML for Windows Embedded will attempt to instead use a fallback font in the same font family, and if none is supported in the font family, it will use the default composite font. Also note that if you want to set a font or use the font fallback feature for that font, you must include the catalog item for that font in the OS design. For more information, see Fonts Catalog Items and Sysgen Variables.

If you create a class instance, use an IXRTextElementPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

.NET Framework Equivalent

System.Windows.Documents.TextElement

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management