Problem

Nested Linked DockSites are on way

Posted 5 months ago by Avatar Matthew Bristow

I am unable to drag a Docked Outer ToolWindow into the Inner Docksite but I can drag the Inner DockSite out into the Outer DockSite but once it is docked outside of it can't dock back within.

Seems like it maybe a similar issue to this;

http://www.actiprosoftware.com/community/thread/21049/linked-nested-docksites#103785

 

Using the "SampleApplication-CShartp" I was able to replicate my issue within the ProductSamples > DockingSamples > QuickStart > NestedDockSites > MainControl.xaml

I simply edited the following two files

MainControl.xaml.cs :- Simply Link the DockSites

/// <summary>
/// Initializes an instance of the <c>MainControl</c> class.
/// </summary>
public MainControl() 
{
    InitializeComponent();
    this.OuterDockSite.LinkDockSite(this.InnerDockSite);
}

MainControl.xaml :- Removed a Inner DockSite 2 to make it a little less busy

    <!-- Outer DockSite -->
    <docking:DockSite x:Name="OuterDockSite">
        <docking:SplitContainer>
            <docking:Workspace>
                <docking:TabbedMdiHost>
                    <docking:TabbedMdiContainer>

                        <docking:DocumentWindow Title="Document(Houses InnerDockSite)">
                            <!-- Inner DockSite -->
                            <docking:DockSite x:Name="InnerDockSite">
                                <docking:ToolWindowContainer>
                                    <docking:ToolWindow x:Name="InnerToolWindow1" Title="Inner DockSite 1-1">
                                        <TextBox BorderThickness="0" AcceptsReturn="True" />
                                    </docking:ToolWindow>
                                    <docking:ToolWindow x:Name="InnerToolWindow2" Title="Inner DockSite 1-2">
                                        <TextBox BorderThickness="0" AcceptsReturn="True" />
                                    </docking:ToolWindow>
                                </docking:ToolWindowContainer>
                            </docking:DockSite>
                        </docking:DocumentWindow>

                    </docking:TabbedMdiContainer>
                </docking:TabbedMdiHost>
            </docking:Workspace>

            <docking:ToolWindowContainer>
                <docking:ToolWindow x:Name="OuterToolWindow1" Title="Outer DockSite 1">
                    <TextBox BorderThickness="0" AcceptsReturn="True" />
                </docking:ToolWindow>
                <docking:ToolWindow x:Name="OuterToolWindow2" Title="Outer DockSite 2">
                    <TextBox BorderThickness="0" AcceptsReturn="True" />
                </docking:ToolWindow>
            </docking:ToolWindowContainer>
        </docking:SplitContainer>
    </docking:DockSite>

Reproduction steps (after changing the demo).

1. Drag Inner "DockSite 1-1" out of the Documents (make sure to take just 1-1).
2. Dock Inside "Outer DockSite 1"
3. Drag Inner "DockSite 1-1" or any of the others and try and dock inside Inner DockSite 1-2 like "Inner DockSite 1-1" was orignally.

Update

I was having a little play today programatically moving the ToolWindows and I can see from Snoop that they are there before I move them but after they simply disapear.

        private void Button_Click_1(object sender, System.Windows.RoutedEventArgs e)
        {
            this.InnerToolWindow1.MoveToLinkedDockSite(this.OuterDockSite);
            this.OuterToolWindow1.MoveToLinkedDockSite(this.InnerDockSite);
        }

[Modified 5 months ago]


Comments (5)

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA

Hi Matthew,

Thanks for reporting this and for the sample.  We've made some changes for the next build so it will look for the innermost dock host match when determining which dock guides to show.  If you'd like to try a preview build, please write our support address and mention this thread.


Actipro Software Support
Posted 5 months ago by Matthew Bristow

I can now dock ToolWindows that are from the Parent DockSite to the Child, and from the Child to the Parent.

I now have an issue where I can not Dock my "Dockable ToolWindow" back into the Parent Docksite by dragging it but I can Dock it via the drop down menu and selecting Dock.

I have sent you an email containing my example, which is slighlty more complex than the modified example above.

I also would like some advice on how I should deal with Docking my left most ToolWindow to the right of my "Dockable ToolWindow". As with the current implementation the docking handles change depending on your mouse location, so once I move it over the "Dockable ToolWindow" towards the right that takes over.

Looking at the forum post below, it looks like we don't have any ability to change this.

http://www.actiprosoftware.com/community/thread/21049/linked-nested-docksites#103773

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA

Hi Matt,

For the next build, we've added the ability to hold Shift to dock into an alternate dock host (the parent one) at the same location.  This should help resolve the problem, as it will allow you to select which dock host to dock into in this scenario.


Actipro Software Support
Posted 5 months ago by Matthew Bristow

As discussed yesterday, programatically moving the ToolWindows between linked nested docksites does not work still in the latest version.

I was still using the Nested Docksites example from your Samples Application using the modified code from my original post.

I would have expected the InnerToolWindow1 to move to the OuterDockSite, and the OuterToolWindow1 to move to the InnerDockSite but instead they disapear.

See the gif below.

https://drive.google.com/file/d/1RLsOY46YGNyApph6zrjv7IFkFqKtLwsl/view?usp=sharing

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA

Hi Matt,

For the programmatic MoveToLinkedDockSite() issue, the docking window is moved ok.  It's just it's closed in the new dock site.  You need to call Activate() (if you want it fully opened, displayed, and focused) or Open() on it right after MoveToLinkedDockSite() to add it to the UI in the new dock site.  Then it works fine.


Actipro Software Support
Information The latest build of this product (2018.1 build 0670) was released 7 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.