Archive for June, 2009

The future has arrived and it’s the next generation of Wright programmer. I might be a little slow answering email for the next couple of days as young Dominic gets used to the real world. Normal service should be resumed towards the end of the week.

The very essence of docking windows is the ability to drag and drop content into new positions quickly and easily. Showing such a dynamic feature in pictures is a little difficult but you can see here that I have implemented the drop indicators.

In this example I am dragging the floating window by using the caption bar and then hovering over the top drop indicator for the target docking control. The light blue rectangle at the top of the docking control shows the relative position of the content when it is added using this indicator. On releasing the mouse we get the following result.

Because each docking control is actually a KryptonWorkspace it means we can organize the content pages in any way we wish. To show this I then dragged Page 1 and Page 2 in order to create a more complicated layout that might not be very useful in practice.

The user can create whatever arrangement they like. This also applies to floating windows as the client area of the floating window is also derived from KryptonWorkspace. If you have multiple monitors then this allows you to make the best use of the screen real estate. Create a floating window per extra monitor, maximize each floating window and then use drag and drop to organize content as needed. This would allow your application to be used on 2, 3 or more monitors and really get the best use of that space.

The operation of the docking windows is designed to closely mimic the way that Visual Studio 2010 Beta operates and not the current VS2008. So if the following does not look or feel quite right that is most likely because you have not played around with VS2010. Each docking window has a drop down button that when pressed gives a list of possible docking options. Like this…

The Close and Auto Hide options are just alternate ways of performing the same actions as the pin and close buttons  that were already described in the last post. Float and Dock options are fairly obvious and switch the individual page between being a floating window and docked back again against a control edge. Tabbed Document is used to move the page into the filler control that occupies the client area of the control. Under VS2010 this means the page is moved to the editing area so you can see that page alongside code editing or design surface windows. If we select the above Float option we get the following modeless windows appear…

You probably think the window looks a little odd. Under VS2010 the appearance and operation of the window has changed to make it easier to use docking windows on multi-monitor machines. If you double click the window caption in VS2008 it would restore the contents back to be docked windows. With VS2010 and Krypton Docking it maximizes the window. This allows you to place several pages inside the floating window and then maximize it on a different monitor in order to make use of multiple monitors effectively.

Finally I have gotten far enough that I can actually take a couple of screen snapshots and show something happening. Here we have three pages in a tabbed setup docked on the left side of form. The mouse is hovering over the pin that is used to switch to the auto hidden mode…

When pressed you get the expected group on the left edge of the form.

Move the mouse over the auto hidden tab and after a short delay it will slide out so it overlaps the client area. It operates like the Visual Studio environment where moving the mouse away from the area causes it to slide back again.

Now onto floating pages and the ability to restore back to where they came from.