Typeface.Weight 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得字樣的相對粗細。
public:
property System::Windows::FontWeight Weight { System::Windows::FontWeight get(); };
public System.Windows.FontWeight Weight { get; }
member this.Weight : System.Windows.FontWeight
Public ReadOnly Property Weight As FontWeight
屬性值
FontWeight 值,表示字樣的相對粗細。
範例
// Get the font weight value for the typeface.
FontWeight fontWeight = typeface.Weight;
if (fontWeight == FontWeights.ExtraBold)
{
// Perform action based on extra bold weight value.
}
' Get the font weight value for the typeface.
Dim fontWeight As FontWeight = typeface.Weight
If fontWeight = FontWeights.ExtraBold Then
' Perform action based on extra bold weight value.
End If
備註
相較于相同字樣中的「標準」字元,粗細通常會以與字樣中指定字元相關聯的增加筆劃或粗細來區分。
注意 並非所有粗細都適用于所有字樣。 當粗細不適用於字樣時,會傳回最接近的相符權數。