Export (0) Print
Expand All

Inline.TextDecorations Property

Gets or sets a value that specifies the text decorations that are applied to the content in an Inline element.

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

public TextDecorationCollection TextDecorations { get; set; }
<inline TextDecorations="Underline"/>
-or-
<inline TextDecorations="None"/>

Property Value

Type: System.Windows.TextDecorationCollection
A TextDecorationCollection, or null if no text decorations are applied.

Dependency property identifier field: TextDecorationsProperty

A text decoration is a visual ornament that you can add to text. WPF supports APIs that let you define a custom text decoration. Silverlight 5 supports only one type of text decoration: Underline. The type name of type used to set this property (TextDecorationCollection) suggests multiple possible values, but only one value is supported. The name provides compatibility between Silverlight and WPF. The TextDecorationCollection object in Silverlight supports only object. It does support Collection interface APIs or a public constructor.

In XAML, you can set TextDecorations to the values Underline or None.

In code, you can set the value of Inline.TextDecorations to Underline or to null. Setting the value to null restores the default value if it has been set to Underline in XAML or code previously.

TextDecorations settings for Run child elements override this top-level setting.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

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

Community Additions

ADD
Show:
© 2014 Microsoft