Modifiability 枚举

定义

为二进制 XAML (BAML) 类或类成员指定 LocalizabilityAttribute 的可修改性值。

C#
public enum Modifiability
继承
Modifiability

字段

Inherit 2

目标值可修改性继承自其父节点。

Modifiable 1

目标值可由本地化人员修改。

Unmodifiable 0

目标值不能由本地化人员修改。

示例

下面的代码示例显示了为按钮定义的本地化属性的可修改性值。

XAML
<!-- 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属性可以应用于类、属性或方法。

有关如何使用本地化属性的详细信息,请参阅 本地化属性和注释

适用于

产品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
Windows Desktop 3.0, 3.1, 5, 6, 7

另请参阅