DocumentContent disappears under certain circumstances

Mar 22, 2010 at 8:35 AM
Edited Mar 22, 2010 at 8:49 AM

Assume that one DocumentPane contains two DocumentContents.
The second DocumentContent will disappear if I make the following operations:
1. Drag the second DocumentContent and dock it to the right side.
2. Drag it again and make it float.
3. Right click on the floating window and select "Tabbed Document".

I guess the second DocumentContent is contained in a new DocumentPane after

being docked in the right side. And if we drag it out now, its container will be invisible, and

that is why the DocumentContent is also invisible after the "Tabbed Document" context menu is clicked.

 

Hope my assumption can help to fix it!

Thanks!!

Apr 7, 2010 at 6:10 AM

maybe I did not express the problem clearly, let me try it again.

the xaml code is like this:

<avalon:DockingManager x:Name="manager">

                <avalon:ResizingPanel>

                    <avalon:DocumentPane>

                        <avalon:DocumentContent x:Name="doc1" Title="document1" IsFloatingAllowed="True">
                            doc1
                        </avalon:DocumentContent>

                        <avalon:DocumentContent x:Name="doc2" Title="document2" IsFloatingAllowed="True">
                            doc2
                        </avalon:DocumentContent>

                    </avalon:DocumentPane>

                </avalon:ResizingPanel>

            </avalon:DockingManager>

and there is no C# code behind.

now if I run it, drag and dock document2 to the right side of the window, then drag document2 out of the window to make it a independent window(I set the isFloatingAllowed to true), and then  right click on document2 and select "Tabbed Document", the document2 will disappear.

had anyone else encountered this problem?
or was I using AvalonDock in a wrong way?
if you know what's the cause, please help. Thanks!

Apr 7, 2010 at 9:09 AM
Edited Apr 7, 2010 at 9:29 AM

or we can make it simpler, the xaml is like this:

<avalon:DockingManager x:Name="manager">
            <avalon:ResizingPanel>
                <avalon:DocumentPane>
                    <avalon:DocumentContent x:Name="doc1" Title="document1" IsFloatingAllowed="True" InfoTip="111111111">
                        doc1
                    </avalon:DocumentContent>
                </avalon:DocumentPane>

                <avalon:DocumentPane>

                    <avalon:DocumentContent x:Name="doc2" Title="document2" IsFloatingAllowed="True" InfoTip="222222222">
                        doc2
                    </avalon:DocumentContent>
                </avalon:DocumentPane>
            </avalon:ResizingPanel>
        </avalon:DockingManager>

run it, it looks like the screen shot above.

now just drag document2 out of the window to make it a independent window(I set the isFloatingAllowed to true), and then  right click on document2 and select "Tabbed Document", the document2 will disappear.