語言

TextBlock.SetFontStyle(DependencyObject, FontStyle) 方法

定義

設定指定相依物件所 FontStyle 附屬性的值。

public:
 static void SetFontStyle(System::Windows::DependencyObject ^ element, System::Windows::FontStyle value);
public static void SetFontStyle(System.Windows.DependencyObject element, System.Windows.FontStyle value);
static member SetFontStyle : System.Windows.DependencyObject * System.Windows.FontStyle -> unit
Public Shared Sub SetFontStyle (element As DependencyObject, value As FontStyle)

參數

element
DependencyObject

這是用來設定屬性值 FontStyle 的依賴物件。

value
FontStyle

設定屬性的新值。

例外狀況

element 是 null。

適用於

另請參閱