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.
I fixed this issue by replacing
xmlns:avalonDock="http://avalondock.codeplex.com"
by
xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
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>
You can add reference to latest AvalonDock version using following command. So you have to enter this command on Package Manager Console on Visual Studio
Install-Package AvalonDock
You can find this window on vs from the Tools menu, select Library Package Manager and then click Package Manager Console. (More details)
Then it will add all the reference to your project automatically !!!
Also replace this line
xmlns:avalonDock="http://avalondock.codeplex.com"
by
xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
As describes by Paul Gillen
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.
.NET assembly runs in partial trust on a network drive, but all other in full trust
(I would have added this answer as a comment but I don't have rep to add comments.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With