一些 AvalonDock 样式问题 (WPF)
我正在尝试将 AvalonDock 实现到我的应用程序中,但我在弄清楚一些样式技术时遇到了困难。如果有人可以帮助解决以下几个问题,我将非常感激:
1)有没有办法从 DocumentPane 中删除主要的“关闭”按钮,而是将单独的按钮放在选项卡上?
2)我的应用程序中有自定义样式的按钮,这些按钮放置在 DockableContent 元素内。只要 DockableContent 停靠,按钮就会使用我的自定义模板,但如果将包含 DockableContent 的 DockablePane 拉出并使其浮动,则按钮会丢失其模板。有什么技巧可以让它保持住吗?
预先感谢您的帮助!
I'm trying to implement AvalonDock into my application, but I'm having trouble figuring out some of the styling techniques. If someone could please help with the following couple of questions, I would be very grateful:
1) Is there a way to remove the main "Close" button from a DocumentPane and instead place individual buttons on the tabs?
2) I have custom-styled buttons in my application that are placed inside DockableContent elements. As long as the DockableContent is docked, the button uses my custom template, but if a pull the DockablePane that contains the DockableContent out and have it floating, the button loses its template. Is there some trick to getting this to hold?
Thanks in advance for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关于#2,这似乎是 AvalonDock 中的一个问题。我有一个 TabControl,当其可停靠内容浮动时,它会失去其样式。对接后,样式将恢复。
解决方法是重置 StateChanged 事件的样式。
With regard to #2, that seems to be a problem in AvalonDock. I have a TabControl that loses its styling when its dockable content is floated. When docked, styling is restored.
The workaround is to reset the styling on the StateChanged event.
我很幸运地通过下载源代码、进行更改并重新编译 DLL 来解决这个问题。
I had the best luck getting around this by just downloading the source code, making my changes, and recompiling the DLL.