Typeface.Style 属性

定义

获取 Typeface 的样式。

public:
 property System::Windows::FontStyle Style { System::Windows::FontStyle get(); };
public System.Windows.FontStyle Style { get; }
member this.Style : System.Windows.FontStyle
Public ReadOnly Property Style As FontStyle

属性值

一个表示字样样式值的 FontStyle 值。

示例

// Get the font style value for the typeface.
FontStyle fontStyle = typeface.Style;

if (fontStyle == FontStyles.Italic)
{
    // Perform action based on italic style value.
}
' Get the font style value for the typeface.
Dim fontStyle As FontStyle = typeface.Style

If fontStyle = FontStyles.Italic Then
    ' Perform action based on italic style value.
End If

注解

三个词对字体倾斜进行分类:正常、倾斜和斜体。

适用于