The first stable release of the Silverlight 5 Multi-Window Controls project is now available on CodePlex which brings external window support to the ChildWindow and ContextMenu.
So what’s next if anything?
I came across Tim Heur’s Silverlight FloatableWindow project on CodePlex, that adapts the ChildWindow control for non-modal use, and has attracted over 10,000 downloads!
With Silverlight 5 it should be possible to have floating windows that in desktop mode (also known as out-of-browser or OOB mode) can be dragged in and out of the main window.
I started off with Jeff Blackenburg’s Silverlight drag and drop sample, from day 5 of the 31 days of Silverlight series, which lets you move coloured shapes around the main window. Tracing the mouse move coordinates when a drag operation escaped the main window showed that even though the captured object was left behind the x,y coordinates updated. Therefore all that was needed to drag out was to create a new external window when the drag operation begins and move the window as the mouse moves. Then if the drag operation ends inside the main window the external window can be discarded otherwise it should take ownership of the dragged control.
That worked so I updated the prototype to handle simple windows instead of shapes. To see it in it’s full glory you will need to right click on the Silverlight application below to install it on your desktop where you can drag the floating windows in and out of the main window:
This is a work in progress, so constructive feedback is particularly welcome.
The source is available on BitBucket: https://bitbucket.org/ptrelford/floaters
Once I’m happy with usability I plan to integrate it into the Silverlight Multi-Window Controls project on CodePlex.