【发布时间】:2012-09-25 05:09:15
【问题描述】:
我创建了以下样式:
<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>
我看到了除下划线属性之外的所有样式属性 如何创建带下划线的标签样式?
【问题讨论】: