Compartilhar via


TextFormattingRunProperties.SetForeground Method

Gets a new TextFormattingRunProperties with the properties of this one but with the foreground set to the specified color

Namespace:  Microsoft.VisualStudio.Text.Formatting
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

Syntax

'Declaration
Public Function SetForeground ( _
    foreground As Color _
) As TextFormattingRunProperties
public TextFormattingRunProperties SetForeground(
    Color foreground
)
public:
TextFormattingRunProperties^ SetForeground(
    Color foreground
)
member SetForeground : 
        foreground:Color -> TextFormattingRunProperties
public function SetForeground(
    foreground : Color
) : TextFormattingRunProperties

Parameters

  • foreground
    Type: Color

    The new foreground color.

Return Value

Type: Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties
The TextFormattingRunProperties.

Remarks

The foreground brush is changed by this method.

.NET Framework Security

See Also

Reference

TextFormattingRunProperties Class

Microsoft.VisualStudio.Text.Formatting Namespace