AvalonDock 是否可以以编程方式将 DockableContent 状态更改为浮动?
在我的应用程序中,我从“插件”加载窗口,因此我的应用程序直到运行时才知道它们。我正在为每个插件创建 DockableContent 并将其内容设置为插件返回的控件。每个插件都会告诉,它的窗口是否应该最初停靠或浮动,用户可以稍后更改它。
所以我有一个 DockableContent 实例,我想以编程方式将其更改为 FloatingWindow。将 content.DockableStyle 更改为 DockableStyle.Floating 还不够,我还需要做什么?
编辑: 我已经找到了。我已将 DockableContent 添加到 DockPane 并调用 DockableContent.ShowAsFloatingWindow()... 恕我直言,AvalonDock 需要更好的文档......
In my application I'm loading windows from 'plugins', so my app doesn't know them until runtime. I'm creating DockableContent for each plugin and sets it's Content to Control returned by plugin. Each plugin tells, if it's window should be initially docked or floating, user can change it later.
So I have an instance of DockableContent and I want to change it to FloatingWindow programatically. Changing content.DockableStyle to DockableStyle.Floating isn't enough, what else I have to do?
EDIT:
I've found it. I've added DockableContent to DockPane and called DockableContent.ShowAsFloatingWindow()...
IMHO AvalonDock needs better documentation...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到了。我已将 DockableContent 添加到 DockPane 并调用 DockableContent.ShowAsFloatingWindow()...
恕我直言,AvalonDock 需要更好的文档......
I've found it. I've added DockableContent to DockPane and called DockableContent.ShowAsFloatingWindow()...
IMHO AvalonDock needs better documentation...