所有 Button、ListBox等控件获得焦点时有虚线框。如图:选中523这个按钮就出线虚框。

  

WPF控件 在XP下获得焦点有虚线框

 

  我在App.xaml中添加适应所有按钮的样式,无效

<Style  TargetType="{x:Type Button}">
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
</Style> 

  目前的解决方法只能在没有控件或控件样式 里添加代码:

 <Setter Property="FocusVisualStyle" Value="{x:Null}"/>

  稍微麻烦了点,谁有更好的方法?

  本文来自星星工作室的博客,原文地址:http://www.cnblogs.com/star250/archive/2011/10/13/2209748.html

相关文章:

  • 2022-12-23
  • 2021-06-18
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2021-07-03
猜你喜欢
  • 2021-07-12
  • 2022-12-23
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案