.NET Framework Class Library for Silverlight
ContentControl..::.TextDecorations Property
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets or sets the collection of visual ornaments applied to the text that is displayed in the control. .

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

Syntax

Visual Basic (Declaration)
<TypeConverterAttribute(GetType(TextDecorationCollectionConverter))> _
Public Property TextDecorations As TextDecorationCollection
Visual Basic (Usage)
Dim instance As ContentControl
Dim value As TextDecorationCollection

value = instance.TextDecorations

instance.TextDecorations = value
C#
[TypeConverterAttribute(typeof(TextDecorationCollectionConverter))]
public TextDecorationCollection TextDecorations { get; set; }
Visual C++
[TypeConverterAttribute(typeof(TextDecorationCollectionConverter))]
public:
property TextDecorationCollection^ TextDecorations {
    TextDecorationCollection^ get ();
    void set (TextDecorationCollection^ value);
}
JScript
public function get TextDecorations () : TextDecorationCollection
public function set TextDecorations (value : TextDecorationCollection)
XAML Attribute Usage
<object TextDecorations="Underline"/>

Property Value

Type: System.Windows..::.TextDecorationCollection

The collection of visual ornaments applied to text that is displayed in the control. The default is nullNothingnullptra null reference (Nothing in Visual Basic).

Remarks

Text decorations are typically baselines, overlines, underlines, or strikethroughs. In Silverlight 2 Beta 2, you can specify Underline only.

The TextDecorationCollection class does not have a public constructor or typical collection methods. In XAML, you can set TextDecorations to Underline. You can also set the value to an empty string.

In code, you can set the value of TextBlock..::.TextDecorations to Underline or null, which is the same as setting TextDecorations to an empty string in XAML. This restores the default value.

See Also

Reference

Page view tracker