WPF按钮无边框无背景 [英] WPF Button No Border No Background
问题描述
我只需要如此简单,它看起来像一个TextBlock一个按钮。前一段时间我看到了SO样式基于静态样式菜单中的一个按钮,该按钮,但我无法找到答案的答案(我一直在寻找一个小时)。有谁知道我指的是什么系统的风格和语法到样式应用到一个按钮?
I just need a button so simple that it looks like a TextBlock. Some time ago I saw an answer on SO to style the button based on a static style for a button in a menu but I cannot find that answer (and I have been searching for an hour). Does anyone know what system style I am referring to and the syntax to apply that style to a button?
推荐答案
它是可能用于您提到到工具栏按钮的风格?工具栏控制优先,使他们出现扁平的按钮样式。您可以在样式应用到一个按钮,这样的...
Is it maybe the style used for a button in a ToolBar that you're referring to? The ToolBar control overrides the Button style so they appear flat. You can apply that style to a button like this...
<Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" />
这篇关于WPF按钮无边框无背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!