TextDecorations Class

Implements a set of predefined text decorations.

Inheritance Hierarchy

System.Object
  System.Windows.TextDecorations

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

Syntax

'Declaration
Public NotInheritable Class TextDecorations
public static class TextDecorations
See Remarks.

The TextDecorations type exposes the following members.

Properties

  Name Description
Public propertyStatic memberSupported by Silverlight for Windows Phone Underline Specifies an underlined text decoration.

Top

Remarks

A text decoration is a visual ornament that you can add to text. In WPF, you can define custom text decorations. In Silverlight 5, there is one type of text decoration: Underline.

TextDecorationCollection is the value type for Silverlight properties or attributes that specify a font style value, but you must use static properties of TextDecorations to provide a FontStyle value. In XAML, you specify the name of a FontStyles property as the attribute value. This functionality is enabled by native XAML parsing behavior that processes the string value.

In code, you can set the value of properties such as Inline.TextDecorations directly to Underline, or you can set to nulla null reference (Nothing in Visual Basic) (for the equivalent behavior of setting to empty string in XAML, or to restore the default value).

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Windows Namespace

TextBlock

Run