Localization 類別

定義

Localization 類別定義當地語系化屬性 (Attribute) 及註解的附加屬性 (Property)。

public ref class Localization abstract sealed
public static class Localization
type Localization = class
Public Class Localization
繼承
Localization

範例

下列程式碼範例顯示針對文字區塊定義的當地語系化屬性和批註。

<!-- Define localization attributes and comments for the text block.
    - The content is visible to the localizer and can be changed.
    - The font size property is visible to the localizer and can be changed.
    - The comment specifies that the trademark font size should be used. -->
<TextBlock
  FontSize="14"
  Localization.Attributes=
    "$Content(Text Readable Modifiable) FontSize(Font Readable Modifiable)"
  Localization.Comments=
    "$Content(Trademark) FontSize(Trademark font size)" >
  your company name here
</TextBlock>

備註

標記作者在可延伸的應用程式標記語言 (XAML) UI 中,可能會有特定元素的需求,例如文字長度、字型系列或字型大小的條件約束。 當地語系化人員必須知道,才能提供一致的當地語系化。 當地語系化屬性可以在可延伸的應用程式標記語言內指定 (XAML) ,讓作者能夠將其當地語系化需求傳達給當地語系化人員。 這些屬性提供當地語系化的規則和提示,可用來修改應用程式。 當地語系化屬性有兩種類型:

  • 當地語系化屬性。 屬性會指定要當地語系化的資源,例如 FontFamily

  • 當地語系化批註。 批註是標記作者所包含的自由格式文字。

如需如何使用這些當地語系化屬性的詳細資訊,請參閱 當地語系化屬性和批註

欄位

AttributesProperty

識別 Attributes 附加屬性。

CommentsProperty

識別 Comments 附加屬性。

附加屬性

Attributes

Localization 類別定義當地語系化屬性 (Attribute) 及註解的附加屬性 (Property)。

Comments

Localization 類別定義當地語系化屬性 (Attribute) 及註解的附加屬性 (Property)。

方法

GetAttributes(Object)

從指定的項目取得 AttributesProperty 附加屬性的值。

GetComments(Object)

從指定的項目取得 CommentsProperty 附加屬性的值。

SetAttributes(Object, String)

設定指定之項目的 AttributesProperty 附加屬性。

SetComments(Object, String)

CommentsProperty 附加屬性設定為指定的項目。

適用於