我创建了以下样式:
<Style x:Key="LinkText" TargetType="{x:Type Label}">
<Setter Property="Label.FontFamily" Value="Verdana"/>
<Setter Property="Label.FontSize" Value="13"/>
<Setter Property="Label.Foreground" Value="Blue"/>
<Setter Property="TextBlock.TextDecorations" Value="Underline"/>
</Style>
但是当我尝试在某个标签上使用它时,UnderLine 丢失了。
我在我的 UserControl 上写了下一个标签:
<Label Grid.Column="1" HorizontalAlignment="Right" Style="{StaticResource LinkText}">
<TextBlock>some text</TextBlock></Label>
我看到除下划线属性之外的所有样式属性如何创建带下划线的标签样式?