Typography.SlashedZero 屬性

定義

取得或設定值,該值表示名義上的零字型形式是否應該替換成斜線零。

public:
 property bool SlashedZero { bool get(); void set(bool value); };
public bool SlashedZero { get; set; }
member this.SlashedZero : bool with get, set
Public Property SlashedZero As Boolean

屬性值

Boolean

如果啟用斜線零形式則為 true,否則為 false。 預設值是 false

備註

這個屬性會取得或設定擁有 Typography 屬性的物件上的值,這是存取類別實例的唯一 Typography 方法。 此外,這個屬性支援附加屬性使用方式,以便在 XAML 中的文字包含物件上設定它。

OpenType 字型支援斜線零數位格式,強調字母 「O」 與數位 「0」 之間的差異。 加斜線的零數字通常用於財務和商務資訊中的識別碼。

下列文字顯示使用 Miramonte 字型的範例訂單識別碼。 第一行使用標準的數字。 第二行使用加斜線的零數字,以突顯與大寫字母 "O" 的對比。

使用 OpenType 加斜線之零數字的文字
斜線零數位的範例

下列程式碼範例示範如何使用 屬性定義 Miramonte 字型 SlashedZero 的斜線零數位。

<Paragraph FontFamily="Miramonte">
  <Run>Order #0048-OTC-390</Run>
  <LineBreak/>
  <Run Typography.SlashedZero="True">Order #0048-OTC-390</Run>
</Paragraph>

如果 的值為 SlashedZero true ,且選取的字型不支援斜線零形式,則會顯示數位的預設格式。

XAML Attribute Usage

<object Typography.SlashedZero="bool"/>

相依性屬性資訊

識別碼欄位 SlashedZeroProperty
中繼資料屬性設定為 true AffectsMeasureAffectsRenderInherits

適用於

另請參閱