怎样去掉hyperlinkButton 控件的下划线 两种方式

第一种使用Blend:

用Blend打开项目,在HyperlinkButton上右击鼠标,选择编辑模版,选编辑副本.
OK后,模版上会多出一段样式代码,在模板中找到名为TextElement的TextBox,

<ignore_js_op>Image.jpg
 
 
在XAML中删掉TextDecorations="Underline"即可。
 
第二种,直接写代码;
  <HyperlinkButton HorizontalAlignment="Left"
                                     VerticalAlignment="Top"
                                     FontSize="28"
                                     Foreground="#5e6163"
                                     NavigateUri="http://www.cnblogs.com/Yukang1989/"
                                     TargetName="_blank">
                            <HyperlinkButton.Template>
                                <ControlTemplate>
                                    <TextBlock TextAlignment="Left" >访问WPDream_Melody博客</TextBlock>
                                </ControlTemplate>
                            </HyperlinkButton.Template>
                        </HyperlinkButton>
原文地址:https://www.cnblogs.com/Yukang1989/p/2892854.html