How would you design a docking library for WPF?

I want to implement a docking library in wpf with behavior similar to Adobe Photoshops CS3.

You can attach floating Panels to other Panels or Docks by mouse dragging. Docks have a fixed location.

Would you use a central Docking Manager class? How would the message flow look like? I was thinking of using 2 interfaces, called IDock and IDockable, with the panel implementing both, and a dock implementing only IDock.

I'm looking for some specific design patterns or OO principles that could help me here, so that the overall design is sound. I know that I'm not really specific here, but that's because I don't know where to start.

Example of a Panel to Panel movement:

alt text http://dl.getdropbox.com/u/133877/Misc/Stackoverflow/wpf_dock_01.png

alt text http://dl.getdropbox.com/u/133877/Misc/Stackoverflow/wpf_dock_02.png

Answers


Maybe you could start studying http://www.codeplex.com/AvalonDock which is a wpf docking library. There is probably something to learn from it.


Need Your Help

Android creates extra fragments after holder activity destroyed by orientation change

android android-fragments oncreate android-orientation ondestroy

I have an acticity that has simple FrameLayout as its layout.I add a fragment with textview programatically.When I change orientation,Android destroys fragment and its holder activity as expected b...

Android query where clause on ListView

android cursor android-listview contextmenu

I created a ListView with a CursorAdapter, populated by a table of my db. After I added a ContextMenu that with a long click on the desired line of ListView pick info from my table.