你如何完全删除按钮边框的WPF? [英] How do you completely remove the button border in wpf?

查看:122
本文介绍了你如何完全删除按钮边框的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 透明了borderThickness 0 ,并且还试图 BorderBrush ={X:空},但你仍然可以看到按钮的轮廓

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆