TextFormattingRunProperties.SetTypeface Method
Gets a new TextFormattingRunProperties with the properties of this one but with the typeface set to the specified typeface.
Namespace: Microsoft.VisualStudio.Text.Formatting
Assembly: Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)
Syntax
'Dichiarazione
Public Function SetTypeface ( _
typeface As Typeface _
) As TextFormattingRunProperties
public TextFormattingRunProperties SetTypeface(
Typeface typeface
)
public:
TextFormattingRunProperties^ SetTypeface(
Typeface^ typeface
)
member SetTypeface :
typeface:Typeface -> TextFormattingRunProperties
public function SetTypeface(
typeface : Typeface
) : TextFormattingRunProperties
Parameters
- typeface
Type: System.Windows.Media.Typeface
The new typeface.
Return Value
Type: Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties
The TextFormattingRunProperties.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | 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 and SetItalic methods.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.