語言

TextBlock.SetFontFamily(DependencyObject, FontFamily) 方法

定義

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

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

參數

element
DependencyObject

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

value
FontFamily

設定屬性的新值。

例外狀況

element 是 null。

適用於

另請參閱