語言

TextBlock.SetFontWeight(DependencyObject, FontWeight) 方法

定義

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

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

參數

element
DependencyObject

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

value
FontWeight

設定屬性的新值。

例外狀況

element 是 null。

適用於

另請參閱