LocalizationCategory 枚举

定义

为二进制 XAML (BAML) 类或类成员指定 LocalizabilityAttribute 的类别值。Specifies the category value of a LocalizabilityAttribute for a binary XAML (BAML) class or class member.

public enum class LocalizationCategory
public enum LocalizationCategory
type LocalizationCategory = 
Public Enum LocalizationCategory
继承
LocalizationCategory

字段

Button 4

Button 或相关控件。A Button or related control.

CheckBox 5

CheckBox 或相关控件。A CheckBox or related control.

ComboBox 6

一个 ComboBox 或相关控件,例如 ComboBoxItemA ComboBox or related control such as ComboBoxItem.

Font 14

字体相关数据,比如字体名称、样式或大小。Font-related data such as font name, style, or size.

11

Hyperlink 或相关控件。A Hyperlink or related control.

Ignore 16

不本地化此资源。Do not localize this resource. 这不适用于可能存在的任何子节点。This does not apply to any child nodes that might exist.

Inherit 15

从父节点中继承其类别。Inherits its category from a parent node.

Label 3

Label 或相关控件。A Label or related control.

ListBox 7

一个 ListBox 或相关控件,例如 ListBoxItemA ListBox or related control such as ListBoxItem.

Menu 8

一个 Menu 或相关控件,例如 MenuItemA Menu or related control such as MenuItem.

NeverLocalize 17

不要本地化此资源,或其类别设置为 Inherit 的任何子节点。Do not localize this resource, or any child nodes whose category is set to Inherit.

None 0

资源不属于标准类别。Resource does not belong to a standard category.

RadioButton 9

RadioButton 或相关控件。A RadioButton or related control.

Text 1

适用于较长的文本段。For a lengthy piece of text.

TextFlow 12

适用于可包含文本的面板。For panels that can contain text.

Title 2

适用于单行文本(如用于标题的文本)。For a single line of text, such as text used for a title.

ToolTip 10

ToolTip 或相关控件。A ToolTip or related control.

XmlData 13

XMLXML 数据。data.

示例

下面的代码示例演示为按钮LocalizabilityAttribute定义的类别值。The following code example shows the category value of a LocalizabilityAttribute defined for a button.

<!-- 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特性可应用于类、属性或方法。A LocalizabilityAttribute attribute can be applied to a class, property, or method.

有关如何使用本地化特性的详细信息, 请参阅本地化特性和注释For more information on how to use localization attributes, see Localization Attributes and Comments.

适用于

另请参阅