WPF按钮无边框无背景
我只需要一个简单到看起来像 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它可能是您所指的工具栏中按钮使用的样式吗? ToolBar 控件会覆盖 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...
如果您想要一个看起来像
TextBlock
的按钮,您可以制作一个是TextBlock
的按钮。If you want a button that looks like a
TextBlock
, you can make a button that is aTextBlock
.