FormattedText.SetFontFamily Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the font family for the FormattedText object.
Overloads
SetFontFamily(FontFamily, Int32, Int32) |
Sets the font family for a specified subset of characters in the FormattedText object. |
SetFontFamily(String, Int32, Int32) |
Sets the font family for a specified subset of characters in the FormattedText object. |
SetFontFamily(String) |
Sets the font family for the entire set of characters in the FormattedText object. |
SetFontFamily(FontFamily) |
Sets the font family for a FormattedText object. |
SetFontFamily(FontFamily, Int32, Int32)
Sets the font family for a specified subset of characters in the FormattedText object.
public:
void SetFontFamily(System::Windows::Media::FontFamily ^ fontFamily, int startIndex, int count);
public void SetFontFamily (System.Windows.Media.FontFamily fontFamily, int startIndex, int count);
member this.SetFontFamily : System.Windows.Media.FontFamily * int * int -> unit
Public Sub SetFontFamily (fontFamily As FontFamily, startIndex As Integer, count As Integer)
Parameters
- fontFamily
- FontFamily
The FontFamily to use for text formatting.
- startIndex
- Int32
The starting index of the initial character to apply the font family change to.
- count
- Int32
The number of characters the change should apply to.
Remarks
To set the font family value for the entire text string, use the SetFontFamily method.
Applies to
SetFontFamily(String, Int32, Int32)
Sets the font family for a specified subset of characters in the FormattedText object.
public:
void SetFontFamily(System::String ^ fontFamily, int startIndex, int count);
public void SetFontFamily (string fontFamily, int startIndex, int count);
member this.SetFontFamily : string * int * int -> unit
Public Sub SetFontFamily (fontFamily As String, startIndex As Integer, count As Integer)
Parameters
- fontFamily
- String
A string that constructs the FontFamily to use for text formatting. Fallbacks are permitted; for details, see FontFamily.
- startIndex
- Int32
The starting index of the initial character to apply the font family change to.
- count
- Int32
The number of characters the change should apply to.
Remarks
To set the font family value for the entire text string, use the SetFontFamily method.
Applies to
SetFontFamily(String)
Sets the font family for the entire set of characters in the FormattedText object.
public:
void SetFontFamily(System::String ^ fontFamily);
public void SetFontFamily (string fontFamily);
member this.SetFontFamily : string -> unit
Public Sub SetFontFamily (fontFamily As String)
Parameters
- fontFamily
- String
A string that constructs the FontFamily to use for text formatting. Fallbacks are permitted; for details, see FontFamily.
Remarks
This method sets the font family value for the entire text string. To set the font family value for a subset of the text string, use the SetFontFamily(String, Int32, Int32) method.
Applies to
SetFontFamily(FontFamily)
Sets the font family for a FormattedText object.
public:
void SetFontFamily(System::Windows::Media::FontFamily ^ fontFamily);
public void SetFontFamily (System.Windows.Media.FontFamily fontFamily);
member this.SetFontFamily : System.Windows.Media.FontFamily -> unit
Public Sub SetFontFamily (fontFamily As FontFamily)
Parameters
- fontFamily
- FontFamily
The FontFamily to use for text formatting.
Remarks
This method sets the font family value for the entire text string. To set the font family value for a subset of the text string, use the SetFontFamily method.
Applies to
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про