Typography.SlashedZero 屬性


取得或設定值,該值表示名義上的零字型形式是否應該替換成斜線零。Gets or sets a value that indicates whether a nominal zero font form should be replaced with a slashed zero.

 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


如果啟用斜線零形式則為 true,否則為 falsetrue if slashed zero forms are enabled; otherwise, false. 預設值為 falseThe default value is false.


此屬性會取得或設定值,在擁有的物件Typography屬性,這是唯一的方式來存取Typography類別執行個體。This property gets or sets a value on the object that owns a Typography property, which is the only way to access a Typography class instance. 此外,這個屬性還支援中的附加的屬性使用方式,因此它可以設定上的文字包含物件XAMLXAMLIn addition, this property supports an attached property usage so that it can be set on text-containing objects in XAMLXAML.

OpenType 字型支援加斜線的零數字格式,以強調字母"O"與數字"0"之間的差異。OpenType fonts support a slashed zero numeral format to emphasize the difference between the letter "O" and the numeral "0". 加斜線的零數字通常用於財務和商務資訊中的識別碼。The slashed zero numeral is often used for identifiers in financial and business information.

下列文字顯示使用 Miramonte 字型的範例訂單識別碼。The following text displays a sample order identifier using the Miramonte font. 第一行使用標準的數字。The first line uses standard numerals. 第二行使用加斜線的零數字,以突顯與大寫字母 "O" 的對比。The second line used slashed zero numerals to provide better contrast with the uppercase "O" letter.

使用 OpenType 斜式零的數字Text using OpenType slashed zero numerals
範例中的斜線零數字Example of slashed zero numerals

下列程式碼範例示範如何定義斜線零數字 Miramonte 字型,使用SlashedZero屬性。The following code example shows how to define slashed zero numerals for the Miramonte font, using the SlashedZero property.

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

如果值SlashedZerotrue和選取的字型不支援斜式零形式時,會顯示數字的預設表單。If the value of SlashedZero is true and the selected font does not support slashed zero forms, the default form of the numeral is displayed.

XAML Attribute UsageXAML Attribute Usage

<object Typography.SlashedZero="bool"/><object Typography.SlashedZero="bool"/>

相依性屬性資訊Dependency Property Information

識別項欄位Identifier field SlashedZeroProperty
若要設定的中繼資料屬性 trueMetadata properties set to true AffectsMeasureAffectsRenderInheritsAffectsMeasure, AffectsRender, Inherits