This project is read-only.

Creating a Firefox or Chrome like behaviour

Jun 28, 2010 at 9:30 AM

Hi. First of all I want to say that I haven't check out the new 1.3 release, so I don't know if the problem that I have is possible to solve with the new release.

Basically, in my application, I have multiple windows and multiple documents that needs to be dockable from one window to the other, like in firefox.

Also, what is desirable is that when I drag the document outside the window, my application should figure out that the document that is dropped on a non dockable surface has not docked and it should react accordingly, like create a new window with this document.

I have made a few changes to v1.2 so I can do all this stuff.

Here there are:

1) Make DragPaneServices a singleton class, so every docking manager is visible to the drag drop operation, this gives me ability to dock a document from one docking manager to the other.

2) Create a property inside ManagedContent class CanSwitchDockingManager that is by default false. This should retain the old behaviour of AvalonDock.

3) Create 4 events in DockingManager so I can attach to them and act accordingly, ManagedContentRemovedFromDockingManager, ManagedContentAddedToDockingManager, ManagedContentNotDroppedOnSurface, ManagedContentDroppedOnSurface.

4) Change the DragPaneService in accordance with the newly defined events and logic of docking contents.

 

I have also made quite a few changes to the Avalon Dock 1.2 so I don't know if I should create patch or not. Should I just post the entire source code of changed AvalonDock to some sharing service so everyone can immediately use it?

Currently I can not check out AvalonDock 1.3 and make these changes to that version too.

I think that other people have the same problems with avalon dock so these changes should alleviate some of them.

Cheers.

Jul 20, 2010 at 7:07 AM

Ado, please reply. What are your thoughts on this?

Jul 20, 2010 at 7:44 AM

Version 1.3 supports this. However, it does NOT support a new process such as chrome does.

Dec 7, 2010 at 7:02 PM

GeertvanHorrik,

How do I enable this behaviour in version 1.3?

Dec 7, 2010 at 7:02 PM
Edited Dec 7, 2010 at 7:06 PM


It is not possible to create custom processes. The architecture of AvalonDock does not support this.
Dec 7, 2010 at 7:09 PM

Geert, maybe I've expressed myself in a wrong way. I'm trying to dock a FloatingWindow to a different DockingSite on the same process. Is this implemented? I don't care about different processes.

Dec 7, 2010 at 7:14 PM

I am not sure about multiple docking managers. I am only aware of the fact that you can now drag a window out (like the multiple monitor support of Visual Studio).

Dec 8, 2010 at 8:44 AM

I have uploaded my version of Avalon Dock v 1.2 with all the features, and more, that you have requested.

http://www.easy-share.com/1913226072/AvalonDock.7z

I will try to implement all these features on v1.3 in the near future.

Cheers.

Dec 8, 2010 at 1:32 PM

dejanberic,

We are going to port your implementation to the version 1.3. However, I believe we will need to create another repository to commit the changes, as this project looks abandoned.

Jul 19, 2011 at 4:48 PM

Did anything get done on this piece of work? I'm looking at implementing an app which has multiple top-level frames, each with its own docking manager to lay out the components within it, but would like to be able to tear off components and move them between owning docking managers. If this is possible, I'd be really interested in seeing the implementation.

Jul 21, 2011 at 9:44 AM

I have uploaded Avalon Dock version v 1.3 with all the features. This source code is modified from changeset 62949 http://avalondock.codeplex.com/SourceControl/changeset/changes/62949, so this version does not have all the latest code.

This version of Avalon Dock supports ChromeLike behaviour in the sense that you can dock between multiple docking manager in different windows. This is all configurable. For example maybe some type of document is not permitted to switch docking managers,

so you just set the property CanSwitchDockingManager to false, otherwise to true. There are many more changes and improvements, such as better persistance support which can be used to create workspace management etc.

http://www.easy-share.com/1916806639/AvalonDock 1.3 ChromeLikeBehaviour.7z

I don't have time to create the patches and submit it to codeplex, but all the changes that differ from the original version is markes with region "Customization". So if I added a new property in some class I surrounded that property with region named "Customziation".

If I'm not able to soon update this version to the latest changeset and submit the patches I hope someone will. :)

Hope this helps.

Cheers.

Jul 21, 2011 at 2:08 PM

Thanks very much - much appreciated.

Interestingly, just converting the DragPaneServices achieves the main multiple dock-manager functionality - I guess the event handlers are just implementation icing to achieve notifications etc after a panel has switched frames.

Thanks again for your help.