Upgrade AvalonDock from 1.3 to 2.0

Asked by on 2012-08-09T06:57:32-04:00
I'm trying to upgrade AvalonDock in a application from 1.3 to 2.0 but there exist little to no documentation on this.

I look at the simple, imported it by doing this

xmlns:avalonDock="http://avalondock.codeplex.com"
However this did not work.

Error The tag 'DockingManager' does not exist in XML namespace 'http://avalondock.codeplex.com'. Line 41 Position 10.
I also tried it the old way.

xmlns:avalonDock="clr-namespace:AvalonDock;assembly=AvalonDock"
Neither did this work

Error The tag 'ResizingPanel' does not exist in XML namespace 'clr-namespace:AvalonDock;assembly=AvalonDock'. Line 71 Position 22.
If they have renamed the controls it would be useful to have a list of the controls now existing in 2.0.

I tried to compile the simple code as it was but without success.

Best Answer

Answered by on 2012-08-20T10:13:54-04:00
The only documentation currently available is the AvalonDock samples that can be downloaded from codeplex. http://avalondock.codeplex.com/releases

Beyond this, the intellisense is a helpful guide.

============================================================

The error you are seeing for 'DockingManager' is misleading as it still exists in 2.0. The following may help you get rid of those. Additionally, intellisense will begin to work once this is resolved.

Bad things happen with files downloaded from the internet. They have an attribute on them that leads to limited access. You have to manually remove this attribute in order for the XAML to stop fussing.

In windows explorer, right-click the file, choose properties, then click the 'Unblock' button. Do this for every individual file you are using that was downloaded from the internet. Be sure to rebuild the project to replace the blocked copy in the bin folder as well.

As a side note, I am able to still run the project whenever this is the issue. Only the XAML editor thinks that there is a problem.

============================================================

In 2.0, everything is nested in layout controls. All of your panes are either anchorable or document style. Here is a quick example to get you going.

Define your namespace

xmlns:ad="http://avalondock.codeplex.com"
Build your DockingManager

<ad:DockingManager x:Name="dockManager">
 <ad:LayoutRoot>
 <ad:LayoutPanel Orientation="Horizontal">
 <ad:LayoutPanel Orientation="Vertical">
 <ad:LayoutPanel Orientation="Horizontal">
 <ad:LayoutDocumentPaneGroup x:Name="leftDocumentGroup">
 <ad:LayoutDocumentPane>
 <ad:LayoutDocument Title="Left Doc"></ad:LayoutDocument>
 </ad:LayoutDocumentPane>
 </ad:LayoutDocumentPaneGroup>
 <ad:LayoutDocumentPaneGroup x:Name="rightDocumentGroup">
 <ad:LayoutDocumentPane>
 <ad:LayoutDocument Title="Right Doc"></ad:LayoutDocument>
 </ad:LayoutDocumentPane>
 </ad:LayoutDocumentPaneGroup>
 </ad:LayoutPanel>
 <ad:LayoutAnchorablePaneGroup x:Name="bottomAnchorableGroup">
 <ad:LayoutAnchorablePane>
 <ad:LayoutAnchorable Title="Bottom Anch"></ad:LayoutAnchorable>
 </ad:LayoutAnchorablePane>
 </ad:LayoutAnchorablePaneGroup>
 </ad:LayoutPanel>
 <ad:LayoutAnchorablePaneGroup x:Name="rightAnchorableGroup">
 <ad:LayoutAnchorablePane>
 <ad:LayoutAnchorable Title="Right Anch"></ad:LayoutAnchorable>
 </ad:LayoutAnchorablePane>
 </ad:LayoutAnchorablePaneGroup>
 </ad:LayoutPanel>
 </ad:LayoutRoot>
</ad:DockingManager>
Your Answer
No advertising and No spamming please.
Name:
Answer:

All Answers

Answered by on 2012-08-29T12:02:38-04:00
I had a similar error message when I first switched to AvalonDock 2.0. This is probably a long shot, but do you have the AvalonDock.dll on a network drive? I found that once I moved the DLL to my project directory I no longer had that problem.

http://stackoverflow.com/a/4828205/918431

(I would have added this answer as a comment but I don't have rep to add comments.)