码迷,mamicode.com
首页 > Windows程序 > 详细

WPF HyperLink链接下划线隐藏

时间:2018-09-28 19:02:26      阅读:1369      评论:0      收藏:0      [点我收藏+]

标签:添加   block   link   rop   hyper   resource   tde   res   引入   

两种方法:

1.在Grid标签内添加资源样式。

<Grid.Resources>
<Style TargetType="Hyperlink">
<Setter Property="TextBlock.TextDecorations" Value="{x:Null}"></Setter>
</Style>
</Grid.Resources>

2.在windows.resource里面添加样式。

<Window.Resources>
<Style TargetType="Hyperlink">
<Setter Property="TextBlock.TextDecorations" Value="{x:Null}"></Setter>
</Style>
</Window.Resources>

当然也可以动态资源添加,或者单独样式引入等等。

WPF HyperLink链接下划线隐藏

标签:添加   block   link   rop   hyper   resource   tde   res   引入   

原文地址:https://www.cnblogs.com/uftwkb24/p/9720034.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!