Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TextElement.Language Property

Gets or sets the language of the content within an TextElement element.

Namespace:  System.Windows.Documents
Assembly:  System.Windows (in System.Windows.dll)

public XmlLanguage Language { get; set; }
<textElement Language="xmlLanguageStr" ... />

XAML Values


- or -



Language prefix, using the ISO 639-1 language prefix values. For example "en", or "zh". Uppercase values are accepted and converted to lowercase. This may also be an empty attribute, "".


If provided, must be preceded by a single hyphen. Then, a subcode as defined by RFC 3066. The most typical usage, and the one which is most likely to properly map to a CultureInfo, is a country or regional designation such as "-us" or "-hk". Uppercase values are accepted and equivalent to lowercase.

To specify a Language value in XAML, you specify a string that represents the same string you would use in a call to GetLanguage.

Property Value

Type: System.Windows.Markup.XmlLanguage
A value of type XmlLanguage. The default is a XmlLanguage value created with the string en-US (IetfLanguageTag is "en-US").

Dependency property identifier field: LanguageProperty

Language is generally equivalent to the XML-defined attribute xml:lang. See Remarks for FrameworkElement.Language.


Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft