Wednesday, June 27, 2007

WPF Docking Library - Persistence Support

From http://sourceforge.net/projects/wpfdockinglib/ you can download version 0.1.8 of WPF Docking Library. Major feature added is persistence support. I hope to have time to update article on codeproject, anyway persistence it's very easy to use.

To get layout state in xml format use DockManager.GetLayoutAsXml() and to restore a saved state you can use DockManager.RestoreLayoutFromXml().

The latter method need a handler to library client code because DockManager need to know how to associate dockable contents type strings with client instances during deserialization. This mechanism is almost identical to those you can found in DockPanel Suite.

Here a few lines of code:

if (!string.IsNullOrEmpty(Properties.Settings.Default.DockingLayoutState))
DockManager.RestoreLayoutFromXml(Properties.Settings.Default.DockingLayoutState,
new DockingLibrary.GetContentFromTypeString(this.GetContentFromTypeString));
else
{
//Show PropertyWindow docked to the top border
propertyWindow.DockManager = dockManager;
propertyWindow.Show(Dock.Left);
//Show ExplorerWindow docked to the right border as default
explorerWindow.DockManager = dockManager;
explorerWindow.Show();
//Show ListWindow in documents pane
listWindow.DockManager = dockManager;
listWindow.Show();
}



private DockingLibrary.DockableContent GetContentFromTypeString(string type)
{
if (type == typeof(PropertyWindow).ToString())
return propertyWindow;
else if (type == typeof(ExplorerWindow).ToString())
return explorerWindow;
else if (type == typeof(ListWindow).ToString())
return listWindow;
return null;
}


I suppose you can find same bugs in this version so if you need a more stable release you can wait for version 0.2.

Saturday, June 16, 2007

WPF Docking LIbrary on SourceForge.net!

Hi guys, now you can download latest release of WPF Docking Library from SourceForge.Net web site.
This is the link: http://sourceforge.net/projects/wpfdockinglib/

Just now I published there version 0.1.1 which correct some annoying bugs discovered in version 0.1. Nothing of new relevant features are added.


http://www.codeproject.com/WPF/WPFdockinglib.asp remains the reference link for features overview.

Thursday, June 14, 2007

WPF Docking LIbrary v0.1 is finally published

This time CodeProject team spent a lot of time to publish my article update. I suppose it takes so long because there were many articles posted and queued before mine or maybe they had to make a lot of grammatical corrections to my poor english :). Anyway now is time to think about new release. Here you can find a list of fix or improvements coming in next release:

1. FIX. Contents present in dockable pane are not correctly deallocated during unloading process.
2. FIX. Sometimes when you move a dockable pane to a main border it remains where it is.
3. NEW. You can control DocumentsPane tab items header visibility.
4. NEW. Add ActiveDocumentChangedEvent
5. NEW. Controlling panes and floating windows default size.
6. NEW. Give client code chance to select the pane to add contents.
7. NEW. Add constraints to content ('dockability').
8. NEW. Persistance of docking state.
9. NEW. Preview of documents content when mouse is over relative tab item (like in VISTA)
10.NEW. 3D documents switching view (like in VISTA)
11. Suggestions are welcome!

Thursday, June 7, 2007

WPF Docking Library Screen Shot

WPF Docking library first stable version is about to get posted. It enhances new valuable features like floating windows. With this version a dockable pane can be hosted in a separate window and than it can be docked back to main window. Also contents in pane are now arranged in a restyled tabcontrol which shows an icon in tabitems.
Here you can see a pair of screen shots which show docking in actions:

Library version 0.1 will be posted to CodeProject this weekend.