How would you design a docking library for WPF? - Stack Overflow

admin2022-06-18  26

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:

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.

转载请注明原文地址:https://www.u19.cn/read-153201.html

New Post(0)