Typography.Variants 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 FontVariants 列舉值,這個值表示要使用的標準印刷形式的變化。
public:
property System::Windows::FontVariants Variants { System::Windows::FontVariants get(); void set(System::Windows::FontVariants value); };
public System.Windows.FontVariants Variants { get; set; }
member this.Variants : System.Windows.FontVariants with get, set
Public Property Variants As FontVariants
屬性值
FontVariants 列舉值。 預設值是 Normal。
備註
這個屬性會取得或設定擁有 Typography
屬性的物件上的值,這是存取類別實例的唯一 Typography 方法。 此外,這個屬性支援附加屬性使用方式,以便在 XAML 中的文字包含物件上設定它。
變體類似于上標或下標字型表單。 字型表單可以包含上標與序數表單之間的差異字元集,或在下標和推斷表單之間。 屬性 Variants 可讓您設定 OpenType 字型的上標和下標值。
下列文字顯示上標 Palatino Linotype 字型。
上標的範例
下列程式碼範例示範如何使用 屬性來定義 Pala此 Linotype 字 Variants 型的上標。
<Paragraph FontFamily="Palatino Linotype">
2<Run Typography.Variants="Superscript">3</Run>
14<Run Typography.Variants="Superscript">th</Run>
</Paragraph>
下列文字顯示下標 Palatino Linotype 字型。
注標的範例
下列程式碼範例示範如何使用 屬性來定義 Pala以 Linotype 字 Variants 型的下標。
<Paragraph FontFamily="Palatino Linotype">
H<Run Typography.Variants="Subscript">2</Run>O
Footnote<Run Typography.Variants="Subscript">4</Run>
</Paragraph>
不支援變體的字型可能會有字型表單的演算法近似值。
XAML Attribute Usage
<object Typography.Variants="FontVariants「/>
相依性屬性資訊
識別碼欄位 | VariantsProperty |
中繼資料屬性設定為 true |
AffectsMeasure、AffectsRender、Inherits |