TextFormattingRunProperties.SetForegroundOpacity Method

Gets a new TextFormattingRunProperties with the properties of this one but with the ForegroundOpacity property set to the specified opacity.

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

Syntax

声明
Public Function SetForegroundOpacity ( _
    opacity As Double _
) As TextFormattingRunProperties
public TextFormattingRunProperties SetForegroundOpacity(
    double opacity
)
public:
TextFormattingRunProperties^ SetForegroundOpacity(
    double opacity
)
member SetForegroundOpacity : 
        opacity:float -> TextFormattingRunProperties 
public function SetForegroundOpacity(
    opacity : double
) : TextFormattingRunProperties

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentOutOfRangeException

opacity is less than zero or greater than one.

.NET Framework Security

See Also

Reference

TextFormattingRunProperties Class

Microsoft.VisualStudio.Text.Formatting Namespace