wpf hyperlink 隐藏下划线

            < Style  TargetType ="Hyperlink" >
                
< Setter  Property ="Foreground"  Value ="#209AC2" />
                
<!-- 清除文字修饰(去掉下划线) -->
                
< Setter  Property ="TextBlock.TextDecorations"  Value =" {x:Null} " />
                
< Style.Triggers >
                    
< Trigger  Property ="IsMouseOver"  Value ="True" >
                        
< Setter  Property ="Foreground"  Value ="#F27D00"   />
                        
<!-- 在鼠标悬停时显示下划线 -->
                        
< Setter  Property ="TextBlock.TextDecorations" >
                            
< Setter.Value >
                                
< TextDecorationCollection >
                                    
< TextDecoration  Location ="Underline" />
                                
</ TextDecorationCollection >
                            
</ Setter.Value >
                        
</ Setter >
                    
</ Trigger >
                
</ Style.Triggers >
            
</ Style >

阅读更多
换一批

没有更多推荐了,返回首页