In Label no TextDecorations , try the following:
<Label Width="100" Height="30"> <TextBlock TextDecorations="Underline">TestText</TextBlock> </Label>
Edit: more universal solution
In this case, Label.Content used instead of Label.Content , because the Content property can only be set once:
<Label Tag="TestContent" Width="100" Height="30" HorizontalContentAlignment="Center" Background="AliceBlue"> <TextBlock TextDecorations="Underline" Text="{Binding Path=Tag, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Label}}}" /> </Label>
Anatoliy Nikolaev
source share