共用方式為


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

要設定屬性的目標新值。

例外狀況

elementnull

適用於

另請參閱