7 wpf
我遇到了与全局Deactivate FocusVisualStyle相同的问题.
但没有一个答案可以奏效.
所以,我只是想在我的应用程序中设置所有控件FocusVisualStyle="{x:Null}",任何有效的方法来实现这一目标?
我不想单独设置每个控件.
把它放到你的身上怎么样Application.Resources?:
<Style TargetType="{x:Type Control}">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Style>
Run Code Online (Sandbox Code Playgroud)
为了也影响非控件,请尝试以下方法:
<Style TargetType="{x:Type FrameworkElement}">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Style>
Run Code Online (Sandbox Code Playgroud)
由此Control衍生而来FrameworkElement,他们也都会使用它Style.
| 归档时间: |
|
| 查看次数: |
3977 次 |
| 最近记录: |