LocalizabilityAttribute.Category 属性

定义

获取本地化特性的目标值的类别设置。Gets the category setting of the localization attribute's targeted value.

public:
 property System::Windows::LocalizationCategory Category { System::Windows::LocalizationCategory get(); };
public System.Windows.LocalizationCategory Category { get; }
member this.Category : System.Windows.LocalizationCategory
Public ReadOnly Property Category As LocalizationCategory

属性值

本地化特性的类别设置。The category setting of the localization attribute.

示例

下面的代码示例演示为按钮定义的本地化特性的类别设置。The following code example shows the category settings of localization attributes 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>

注解

下表显示了本地化特性的修改设置。The following table shows the modifiability settings of the localization attribute.

类别设置Category setting 含义Meaning
None 资源不属于标准类别。Resource does not belong to a standard category.
Text 一段较长的描述性文本。A lengthy piece of descriptive text.
Title 单行文本,如标题。A single line of text, such as a title.
Label 短文本字符串,如控件标签。A short text string, such as a control label.
Button Button 或相关控件。A Button or related control.
CheckBox CheckBox 或相关控件。A CheckBox or related control.
ComboBox 或相关控件, ComboBoxItem例如。 ComboBoxA ComboBox or related control, such as ComboBoxItem.
ListBox 或相关控件, ListBoxItem例如。 ListBoxA ListBox or related control, such as ListBoxItem.
Menu 或相关控件, MenuItem例如。 MenuA Menu or related control, such as MenuItem.
RadioButton RadioButton 或相关控件。A RadioButton or related control.
ToolTip ToolTip 或相关控件。A ToolTip or related control.
Hyperlink Hyperlink 或相关控件。A Hyperlink or related control.
TextFlow 可以FlowDocument包含文本的或其他面板。A FlowDocument or other panel that can contain text.
XmlData XMLXML 数据。data.
Font 字体相关数据,如字体系列、字体样式或字体大小。Font-related data such as font family, font style, or font size.
Inherit 从父节点继承类别。Inherits category from parent node.
Ignore 不本地化此资源。Do not localize this resource. 这不适用于资源的任何子节点。This does not apply to any child nodes of the resource.
NeverLocalize 不要本地化此资源,或其类别设置为Inherit的任何子节点。Do not localize this resource, or any of its child nodes whose category is set to Inherit.

适用于

另请参阅