Upgrade AvalonDock from 1.3 to 2.0
Asked Answered
U

6

12

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.

Undertint answered 9/8, 2012 at 10:51 Comment(0)
O
9

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>
Obstetrician answered 20/8, 2012 at 14:5 Comment(5)
How is this answer related to the question above?Gove
Anders, the error he is seeing is misleading. They are caused by the issue I outlined here. Once the procedure I outlined is followed, the errors go away. Was my answer not clear? I would be happy to rephrase if it is not.Obstetrician
ResizingPanel does not exist in AvalonDock 2.0, so it is reasonable that he gets this error when he tries to upgrade his application from AD 1.3 to 2.0. Even if @Frozendragon would also experience the issue you are referring to, the main problem would still not be solved by the above solution.Gove
Anders, fair point. The issue I was describing is evident here because 'DockManager' shows an error when it still exists. I have expanded my answer. Thanks for the feedback.Obstetrician
Thank you, this helped me, the Unblock was the issue in my casePsychoactive
H
36

I fixed this issue by replacing

xmlns:avalonDock="http://avalondock.codeplex.com"

by

xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"

Hickey answered 28/6, 2013 at 13:30 Comment(0)
O
9

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>
Obstetrician answered 20/8, 2012 at 14:5 Comment(5)
How is this answer related to the question above?Gove
Anders, the error he is seeing is misleading. They are caused by the issue I outlined here. Once the procedure I outlined is followed, the errors go away. Was my answer not clear? I would be happy to rephrase if it is not.Obstetrician
ResizingPanel does not exist in AvalonDock 2.0, so it is reasonable that he gets this error when he tries to upgrade his application from AD 1.3 to 2.0. Even if @Frozendragon would also experience the issue you are referring to, the main problem would still not be solved by the above solution.Gove
Anders, fair point. The issue I was describing is evident here because 'DockManager' shows an error when it still exists. I have expanded my answer. Thanks for the feedback.Obstetrician
Thank you, this helped me, the Unblock was the issue in my casePsychoactive
A
4

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

Autogenous answered 4/1, 2014 at 15:36 Comment(0)
I
2

You need to define your namespace as xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"

You also need to ensure your project is configured to use .NET 4 or later.

Istle answered 3/9, 2016 at 1:8 Comment(0)
S
1

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.)

Supersaturated answered 29/8, 2012 at 15:56 Comment(0)
N
0

In my case I had two issues, first was file was blocked and it had to be resolved by unblocking it from file explorer.

enter image description here

Second I had to change the reference to the new address. Change from the following link that listed on AvalodDock Documentation

xmlns:avalonDock="http://avalondock.codeplex.com"

to the new link

xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"

Which also shows up in Intellisense

enter image description here

I'm running.

AvalonDock version:2.0.2000.0

.NET Framework 4.6.1

Natty answered 7/10, 2016 at 14:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.