FrameworkElement.Language FrameworkElement.Language FrameworkElement.Language FrameworkElement.Language Property

定義

取得或設定套用至項目的當地語系化/全球化語言資訊。Gets or sets localization/globalization language information that applies to an element.

public:
 property System::Windows::Markup::XmlLanguage ^ Language { System::Windows::Markup::XmlLanguage ^ get(); void set(System::Windows::Markup::XmlLanguage ^ value); };
public System.Windows.Markup.XmlLanguage Language { get; set; }
member this.Language : System.Windows.Markup.XmlLanguage with get, set
Public Property Language As XmlLanguage

屬性值

這個項目的語言資訊。The language information for this element. 預設值是 XmlLanguage 及其設定為字串 "en-US" 的 IetfLanguageTag 值。The default value is an XmlLanguage with its IetfLanguageTag value set to the string "en-US".

備註

字串格式會遵循 RFC 3066 標準。The string formats follow the RFC 3066 standard. 例如,美國英文是"EN-US"。For example, U.S. English is "en-US". 如需有關值和格式的詳細資訊,請參閱XmlLanguageFor more information on the values and format, see XmlLanguage.

這個相依性屬性繼承的屬性值。This dependency property inherits property values. 如果有子項目,而不需要的其他值Language建立透過本機值或樣式,屬性系統會將值設為可Language指派此值最接近的祖系項目的值。If there are child elements without other values for Language established through local values or styles, the property system will set the value to be the Language value of the nearest ancestor element with this value assigned.

XMLXML 定義的一般意義xml:lang屬性。defines the general meaning of the xml:lang attribute. Language 基本上會公開這個屬性為相依性屬性的意義。Language essentially exposes the meaning of this attribute as a dependency property. Language 可以以程式設計的方式,調整,而且可以參與平行的方式的屬性系統值繼承如何xml:lang屬性可以繼承中的子系項目範圍XMLXMLLanguage can be adjusted programmatically, and can participate in property system value inheritance in a way that parallels how the xml:lang attribute can inherit to child element scope in XMLXML. 如果您設定Language,此值會變成xml:lang並覆寫任何先前的值。If you set Language, that value becomes the xml:lang and overwrites any previous value. 如需詳細資訊,請參閱 < xml: lang 處理中 XAMLFor more information, see xml:lang Handling in XAML.

相依性屬性資訊Dependency Property Information

識別項欄位Identifier field LanguageProperty
若要設定的中繼資料屬性 trueMetadata properties set to true Inherits

適用於