Modifier

Partager via


FormattedText.SetFontFamily Method

Definition

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