Search code examples
mvvmavalondockxceed

Is it possible to prepare bindable MVVM anchorable panes both in main, footer and ride side window using Xceed AvalonDock


I am using AvalonDock control to accomplish bindable and dockable panes.

enter image description here

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}">
  1. Prepare PanesTemplateSelectors, PanesStyleSelectors

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:

enter image description here

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.

Is it possible using AvalonDock


Solution

  • This is not too difficult to accomplish.

    1. Execute the application attached to this article: http://www.codeproject.com/Articles/719143/AvalonDock-Tutorial-Part-Load-Save-Layout

    2. Drag tool windows and documents such that they are as your layout depicts.

    3. Exit the application and review the saved Layout.config file

    4. 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 :-(