Typography.Fraction 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 FontFraction 列舉值,該值表示分數樣式。
public:
property System::Windows::FontFraction Fraction { System::Windows::FontFraction get(); void set(System::Windows::FontFraction value); };
public System.Windows.FontFraction Fraction { get; set; }
member this.Fraction : System.Windows.FontFraction with get, set
Public Property Fraction As FontFraction
屬性值
FontFraction 列舉值。 預設值是 Normal。
備註
這個屬性會取得或設定擁有屬性的物件上的值,這是存取類別實例的唯一 Typography
Typography 方式。 此外,這個屬性支援附加屬性使用方式,以便在 XAML 中包含文字的物件上設定。
OpenType 字型支援分數的樣式,包括斜線和堆疊。
下列文字顯示 Palatino Linotype 字型的分數樣式。
斜線和堆疊分數樣式的範例
下列程式碼範例示範如何使用 屬性來定義 Pala才能使用 Linotype 字 Fraction 型的分數樣式。
<Paragraph FontFamily="Palatino Linotype" Typography.Fraction="Slashed">
1/8 1/4 3/8 1/2 5/8 3/4 7/8
</Paragraph>
<Paragraph FontFamily="Palatino Linotype" Typography.Fraction="Stacked">
1/8 1/4 3/8 1/2 5/8 3/4 7/8
</Paragraph>
XAML Attribute Usage
<objectTypography.Fraction=「 FontFraction 」/>
相依性屬性資訊
識別碼欄位 | FractionProperty |
設定為 的中繼資料屬性 true |
AffectsMeasure, AffectsRender, Inherits |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應