閱讀英文版本

分享方式:


Modifiability 列舉

定義

為二進位 XAML (BAML) 類別或類別成員指定 LocalizabilityAttribute 的可修改性值。

C#
public enum Modifiability
繼承
Modifiability

欄位

名稱 Description
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, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

另請參閱