IXRTextElement::SetLanguage (Compact 2013)
3/28/2014
This method sets the language of the content within an IXRTextElement element.
Syntax
virtual HRESULT STDMETHODCALLTYPE SetLanguage(
__in const WCHAR* pLanguage
) = 0;
Parameters
- pLanguage
[in] Pointer to a string that specifies the language to set for the text element.
Return Value
Returns an HRESULT that indicates success or failure.
Remarks
The pLanguage parameter is generally equivalent to the XML-defined attribute xml:lang. The string formats follow the RFC 3066 / ISO 639-1 standards. For example, U.S. English is "en-US". For more information about the values and format, see National/Regional Language Support (NLS) Catalog Items and Sysgen Variables. If the pLanguage parameter is not set, the IXRTextElement element will inherit the language of its parent. If there is no language setting to inherit, the default value is "en-US".
For the correct language to appear, your OS design must include the corresponding font files by selecting the Catalog items or Sysgen variables for those fonts. The language value will affect the font fallback behavior of text controls such as PasswordBox, TextBox, and TextBlock. 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, and if none is supported, it will use the default composite font. XAML for Windows Embedded uses the default fallback font family "Windows Embedded Compact User Interface" as the composite font. This font is defined as a composite font, whose file name is "WindowsEmbeddedCompactUserInterface.CompositeFont". For more information, see Fonts Catalog Items and Sysgen Variables.
.NET Framework Equivalent
System.Windows.Documents.TextElement.Language
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |