WPF:自定义窗口,标准最小/最大/关闭按钮
我想创建一个自定义 WPF 窗口(WindowStyle = None,AllowsTransparency = True)。但是,我希望最小/最大/关闭按钮看起来与标准窗口上的按钮相同。这可能吗?
I would like to create a custom WPF window (WindowStyle = None, AllowsTransparency = True). However, I would like the min/max/close buttons to look identical to those on standard windows. Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想看看 CodePlex 上 FluidKit 中的 GlassWindow
http://fluidkit.codeplex.com/
源代码具有如下所示的自定义窗口样式。很容易修改为您想要的外观。我用过一次,效果很好
You might want to have a look at GlassWindow in FluidKit at CodePlex
http://fluidkit.codeplex.com/
The source code has a custom Window Style looking like this. It's pretty easy to modify to however you want it to look. I've used it once and it works good
您需要自己“绘制”它们,因为您使用的是
WindowStyle=None
。选择此选项时,您需要根据需要呈现您自己的 Chrome。You'll need to "draw" them yourself, since you're using
WindowStyle=None
. When choosing this option, you'll need to render your own Chrome as desired.