![](/img/trans.png)
[英]How to remove the dotted outline for the header of Expander control in WPF (C#)?
[英]Removing dotted outline around header on active tab in WPF?
当我从WPF
TabControl
中选择一个标签时,我得到一个虚线轮廓或边框,或者您想在标题周围调用它:
我的问题是:有没有办法让它不显示,因为这很烦人。 当整个窗口都处于非活动状态时,该轮廓不会显示,并且仍然希望在窗口处于活动状态时将其删除。
对于这个愚蠢的问题我感到抱歉,但是我只是想不出在Google
搜索什么。
FocusVisualStyle
是您要查找的内容,对于常见样式中的TabItems
,请将此属性设置为TabItems
<TabControl>
<TabItem Header="Page1"/>
<TabItem Header="Page2"/>
<TabItem Header="Page3"/>
<TabControl.ItemContainerStyle>
<Style TargetType="TabItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
</Style>
</TabControl.ItemContainerStyle>
</TabControl>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.