是否可以使用Xceed AvalonDock在主窗口,页脚和乘车侧窗口中准备可绑定的MVVM可锚定窗格 [英] Is it possible to prepare bindable MVVM anchorable panes both in main, footer and ride side window using Xceed AvalonDock
问题描述
我正在使用AvalonDock控件来完成可绑定和可停靠的窗格.
I am using AvalonDock control to accomplish bindable and dockable panes.
我发现了很棒的样品,使我可以这样做.为此需要做一些事情: 我使用了码头管理器:
I found great sample which alowed me do that. A few things are required to do that: I usedDock manager:
<xcad:DockingManager Name="DockingManager" AnchorablesSource="{Binding FooterTools}" DocumentsSource="{Binding MainWindowTools}">
- 准备PanesTemplateSelectors,PanesStyleSelectors
一切看起来都很不错,使我能够使用MVVM模式准备该解决方案.
Everything looks great and enables me to prepare that solution using MVVM pattern.
我想知道如何扩展该解决方案以完成以下草案:
I would like to know how to extend that solution to accomplish following draft:
我有两个来源可以用作可绑定来源:
I have two sources which I can use as a bindable sources:
AnchorablesSource="{Binding FooterTools}" DocumentsSource="{Binding MainWindowTools}"
如果有人指出我的方向或提供提示如何在页脚中创建一个可绑定的窗格,而在右侧中创建另一个可绑定的窗格,我会很高兴.
I would be glad if someone point me direction or give a clue how to make one bindable pane in a footer and another in a right side.
是否可以使用AvalonDock
Is it possible using AvalonDock
推荐答案
这并不是很难实现.
-
执行本文所附的应用程序:拖动工具窗口和文档,使其与您的布局所描绘的一样.
Drag tool windows and documents such that they are as your layout depicts.
退出应用程序并查看保存的Layout.config文件
Exit the application and review the saved Layout.config file
然后,您应该可以将Layout.config文件作为应用程序的资源,并在适合时加载布局.请参阅我的编辑器以获取有关此原理的真实演示: https://github.com/Dirkster99/Edi抱歉,我没有足够的分数,所以我无法附加图像以显示我的意思:-(
You should then be able to make the Layout.config file a resource of your application and load the layout when you see fit. See my editor for a real life demo of this principle: https://github.com/Dirkster99/Edi Sorry, I don't have enough points so I can't attach an image to show what I mean :-(
这篇关于是否可以使用Xceed AvalonDock在主窗口,页脚和乘车侧窗口中准备可绑定的MVVM可锚定窗格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!