开发者

How to disable the dashed contour for TabItem?

开发者 https://www.devze.com 2023-01-27 06:52 出处:网络
When a TabItem has focus it shows开发者_如何学JAVA an inner dashed countour. How to make it transparent or to disabling it to get focus at all?If you\'re talking about the FocusVisualStyle you can rem

When a TabItem has focus it shows开发者_如何学JAVA an inner dashed countour. How to make it transparent or to disabling it to get focus at all?


If you're talking about the FocusVisualStyle you can remove it by adding the following to your TabControl

<TabControl ...>
    <TabControl.Resources>
        <Style TargetType="TabItem">
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        </Style>
    </TabControl.Resources>
    <!-- ... -->
</TabControl>

Update

To make sure we're talking about the same thing

Selected with FocusVisualStyle (dashed countour)

How to disable the dashed contour for TabItem?

Selected without FocusVisualStyle. This is the look you'll get when the TabItem has focused (set by keyboard) and FocusVisualStyle is set to null

How to disable the dashed contour for TabItem?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号