"AvalonDock was written by Adolfo Marinucci. I am in no way involved with the development of AvalonDock but felt that it was time to document some essential things. I am not sure whether I got everything completely right (since I am not the primary developer) but I am building on some experience and simply hope people will give me feedback here if I am making claims that are false.
The first two parts of the tutorial are covering initial preperation steps and adding a Most Recent Files (MRU) tool window and a Start Page. There may be more parts on other AvalonDock subjects (theming, localization, AvalonEdit in AvalonDock 2.0) later. Those who cannot wait for later articles shall look at Edi (http://edi.codeplex.com) to see some of the things before I document them here. This article was in fact written with Edi.
- Download AvalonDock sources from CodePlex (I used build 96566)
- Find the version 2.0 Sub-folder and remove all other sub-folders
- Review the solution in the version 2.0 sub-folder and remove all
test projects except for AvalonDock.MVVMTestApp
I ended up removing the sub-projects:
and was left with:
AvalonDock (docking layout system library)
AvalonDock.Theme.VS2010 (theming resources library)
AvalonDock.Themes.Aero (theming resources library)
AvalonDock.MVVMTestApp (Test apllication to be extended in this article)
- Add a new WPF Application project with the application name that you want to develop based on AvalonDock (mine is Edi) and copy files from AvalonDock.MVVMTestApp into the new project. I also resorted some items into folders and namespaces as you can see if you review V01_Edi.zip. Your solution should look something like this:
Lets get down to Business
Open the solution and set the Edi project as Startup Project in Visual Studio. Hit the F5 key to check that the application runs OK. I have seen the following content in my case:
This part of the tutorial, explains how we can add a Start Page to an application that is build on AvalonDock [2.0]. There may be more parts on other AvalonDock subjects (theming, localization, AvalonEdit in AvalonDock 2.0) later. Those who cannot wait for later articles shall look at Edi (http://edi.codeplex.com) to see some of the things before I document them here. This article was in fact written with Edi.
This article is based on the solution that is described in the previous part 1. We are going to extend the solution in the
V02_Edi_RecentFilesTW.zipfile attached to the previous article. Therefore, it may be useful to download the
V02_Edi_RecentFilesTW.zipfile and the
V03_Edi_RecentFilesTw_StartPage.zipattached to this article - since comparing both versions highlights all things that are necessary to implement the Start Page described here.
So lets have a look at the solution in the
The first thing to note is the
Edi.View.StartPageclasses which are both introduced to implement the viewmodel and view of the Start Page item. We also note a new base ViewModel class of the
FileBaseViewModeltype which is introduced to give the document viewmodels,
StartPageViewModel, a common root. This common root is necessary because the document collection is stored in the
Is it lame that after all this time I've still not used this awesome component in anything but a quick and dirty play-with app? I'm green-fielding some WPF app's now, so maybe... hum...
Related Past Post XRef:
THE open source WinForm & WPF docking library gets overhauled and a new version two, AvalonDock v2's!
AvalonEdit, a (the?) WPF code editor component from the SharpDevelop team (think WPF based, monster cool, code editing, IDE like, uber textbox +10)
Working Workflow into your app's. Workflow Studio, a source available example of rehosting the Workflow Designer