Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
移除按钮边框,包括';选项卡事件';在wpf中?_Wpf_Button - Fatal编程技术网

移除按钮边框,包括';选项卡事件';在wpf中?

移除按钮边框,包括';选项卡事件';在wpf中?,wpf,button,Wpf,Button,通过使用这种样式,我成功地完全删除了按钮边框 <Style x:Key="TransparentStyle" TargetType="{x:Type Button}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button">

通过使用这种样式,我成功地完全删除了按钮边框

    <Style x:Key="TransparentStyle" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border Background="Transparent">
                        <ContentPresenter/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


但是,如何删除TAB键显示的黑色虚线边框?

如果显示该虚线,请尝试将其设置为x:Null

它的效果很好。以下是要分享的来源
@user2711132是的,或者如果您正在使用您在那里共享的透明样式,您可以将其放入样式的setter中