TextFormattingRunProperties.SetTypeface(Typeface) Method

Definition

Gets a new TextFormattingRunProperties with the properties of this one but with the typeface set to typeface.

public:
 Microsoft::VisualStudio::Text::Formatting::TextFormattingRunProperties ^ SetTypeface(System::Windows::Media::Typeface ^ typeface);
public Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties SetTypeface (System.Windows.Media.Typeface typeface);
member this.SetTypeface : System.Windows.Media.Typeface -> Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties
Public Function SetTypeface (typeface As Typeface) As TextFormattingRunProperties

Parameters

typeface
Typeface

The new typeface.

Returns

The TextFormattingRunProperties.

Exceptions

typeface is null.

Remarks

If you wish to only make the formatting either italic or bold, instead of setting a typeface, please use the SetBold(Boolean) and SetItalic(Boolean) methods.

Applies to