次の方法で共有


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

'宣言
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

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

See Also

Reference

TextFormattingRunProperties Class

Microsoft.VisualStudio.Text.Formatting Namespace