次の方法で共有


IXRTextElement::SetFontStyle (Compact 2013)

3/28/2014

This method sets the font style for the text in this text element.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetFontStyle(
    __in XRFontStyle FontStyle
) = 0;

Parameters

  • FontStyle
    [in] An XRFontStyle enumerated type that describes the style in which the text is rendered.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The value of FontStyle might not be used for the font style during rendering because of font fallback. (For information about font fallback, see the Remarks section in IXRTextBlock::GetFontFamily). For example, if the font style XRFontStyle_Italic is specified, but XRFontStyle_Normal is the only font style available, the value of FontStyle is still XRFontStyle_Italic.

.NET Framework Equivalent

System.Windows.Documents.TextElement.FontStyle

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRTextElement
IXRTextElement::GetFontStyle