Partager via


TextFormattingRunProperties.SetBackgroundOpacity Method

Gets a new TextFormattingRunProperties with the BackgroundOpacity 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

'Déclaration
Public Function SetBackgroundOpacity ( _
    opacity As Double _
) As TextFormattingRunProperties
public TextFormattingRunProperties SetBackgroundOpacity(
    double opacity
)
public:
TextFormattingRunProperties^ SetBackgroundOpacity(
    double opacity
)
member SetBackgroundOpacity : 
        opacity:float -> TextFormattingRunProperties 
public function SetBackgroundOpacity(
    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