XAML Text Decorations

Text decorations allows you to add an underline, overline, strikethough, or other decoration to text in XAML. This article explains how to use text decorations in your applicaitons.
  • 3548

Text decorations allows you to add an underline, overline, strikethough, or other decoration to text in XAML. XAML tags <Text.TextDecorations> and <TextDecorations> are used for this purpose.

TextDecorations is a collection of TextDecoration objects.

TextDecorationLocation Enumeration

The Location property of TextDecoration specifies where the decoration will apear.  In XAML, it is represented by <TextDecoration Location /> and in Avalon it is represented by TextDecorationLocation enumeration. It has values Underline, Overline, Strikethrough, and BaseLine, which represent underline, overline, strikethrough, and baseline vertical positions respectively. For example, following code sets text decoration to underline:

<TextDecoration Location="Underline" />
 

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 
© 2020 DotNetHeaven. All rights reserved.