Declaring Text Decorations such as Underline, Strikethrough in a Style

Underlining text can be done either with <Underline>...</Underline> or with the TextDecorations attribute set to Underline. You can include the latter in a style definition:

<Style x:Key="Underlined">
    <Setter Property="TextBlock.TextDecorations" Value="Underline" />
</Style>

<TextBlock Style="{StaticResource Underlined}">
    Foo
</TextBlock>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)