Typography.NumeralStyle 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 FontNumeralStyle 列舉值,這個值會判斷用來呈現數值替代字型型態的圖像集。
public:
property System::Windows::FontNumeralStyle NumeralStyle { System::Windows::FontNumeralStyle get(); void set(System::Windows::FontNumeralStyle value); };
public System.Windows.FontNumeralStyle NumeralStyle { get; set; }
member this.NumeralStyle : System.Windows.FontNumeralStyle with get, set
Public Property NumeralStyle As FontNumeralStyle
屬性值
FontNumeralStyle 列舉值。 預設值是 Normal。
備註
這個屬性會取得或設定擁有屬性的物件上的值,這是存取類別實例的唯一 Typography
Typography 方式。 此外,這個屬性支援附加屬性使用方式,以便在 XAML 中包含文字的物件上設定。
OpenType 字型支援舊樣式數位格式。 此格式適用於顯示樣式不再標準的數字。 下列文字使用 Palatino Linotype 字型的標準和舊樣式數字格式顯示 18 世紀的日期。
標準和舊樣式數位的範例
下列文字顯示 Palatino Linotype 字型的標準數字,後面接著舊樣式數字的數字。
標準和舊樣式數位集的範例
下列程式碼範例示範如何使用 屬性,為 Pala可 Linotype 字 NumeralStyle 型定義舊樣式數位。
<Paragraph FontFamily="Palatino Linotype">
<Run Typography.NumeralStyle="Normal">1234567890</Run>
<Run Typography.NumeralStyle="OldStyle">1234567890</Run>
</Paragraph>
XAML Attribute Usage
<object Typography.NumeralStyle="FontNumeralStyle「/>
相依性屬性資訊
識別碼欄位 | NumeralStyleProperty |
設定為 的中繼資料屬性 true |
AffectsMeasure、AffectsRender、Inherits |