本文介绍了wpf中怎么彻底去掉按钮边框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个带有图像且没有边框的按钮 - 就像在您将鼠标悬停在它们上方并查看完整按钮之前的 Firefox 工具栏按钮一样.

I'm trying to create a button that has an image in it and no border - just like the Firefox toolbar buttons before you hover over them and see the full button.

我已经尝试将 BorderBrush 设置为 Transparent,将 BorderThickness 设置为 0,并且还尝试了 BorderBrush="{x:Null}",但您仍然可以看到按钮的轮廓.

I've tried setting the BorderBrush to Transparent, BorderThickness to 0, and also tried BorderBrush="{x:Null}", but you can still see the outline of the button.

推荐答案

试试这个

<Button BorderThickness="0"
    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" >...

这篇关于wpf中怎么彻底去掉按钮边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 11:01