LocalizationCategory 枚举
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定二进制 XAML (BAML) 类或类成员 LocalizabilityAttribute 的类别值。
public enum class LocalizationCategory
public enum LocalizationCategory
type LocalizationCategory =
Public Enum LocalizationCategory
- 继承
字段
| 名称 | 值 | 说明 |
|---|---|---|
| None | 0 | 资源不属于标准类别。 |
| Text | 1 | 对于较长的文本片段。 |
| Title | 2 | 对于单个文本行,例如用于标题的文本。 |
| Label | 3 | 或 Label 相关控件。 |
| Button | 4 | 或 Button 相关控件。 |
| CheckBox | 5 | 或 CheckBox 相关控件。 |
| ComboBox | 6 | 或 ComboBox 相关控件,如 ComboBoxItem. |
| ListBox | 7 | 或 ListBox 相关控件,如 ListBoxItem. |
| Menu | 8 | |
| RadioButton | 9 | 或 RadioButton 相关控件。 |
| ToolTip | 10 | 或 ToolTip 相关控件。 |
| Hyperlink | 11 | 或 Hyperlink 相关控件。 |
| TextFlow | 12 | 对于可以包含文本的面板。 |
| XmlData | 13 | XML 数据。 |
| Font | 14 | 与字体相关的数据,如字体名称、样式或大小。 |
| Inherit | 15 | 从父节点继承其类别。 |
| Ignore | 16 | 不要本地化此资源。 这不适用于可能存在的任何子节点。 |
| NeverLocalize | 17 | 请勿本地化此资源,或者其类别设置为 “继承”的任何子节点。 |
示例
下面的代码示例显示了为按钮定义的类别值 LocalizabilityAttribute 。
<!-- Define localization attributes for the button.
- The content is visible to the localizer and can be changed.
- The font family property is visible to the localizer but cannot be changed. -->
<Button
FontFamily="Microsoft San Serif"
Localization.Attributes=
"$Content(Button Readable Modifiable) FontFamily(Font Readable Unmodifiable)" >
your company name here
</Button>
注解
LocalizabilityAttribute特性可以应用于类、属性或方法。
有关如何使用本地化属性的详细信息,请参阅 本地化属性和注释。