共用方式為


TextDecorations.Underline Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Specifies an underlined text decoration.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Shared ReadOnly Property Underline As TextDecorationCollection
public static TextDecorationCollection Underline { get; }

Property Value

Type: System.Windows.TextDecorationCollection
A TextDecorationCollection that represents an underlined text decoration.

Remarks

The XAML usage for Underline is not an attribute syntax of the TextDecorations type (TextDecorations cannot be instantiated in XAML). Instead, Underline is a static property that can be used to fill properties/attributes that take the type TextDecorationCollection, either in code or XAML. Examples of such properties/attributes are TextBlock.TextDecorations and Inline.TextDecorations.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.