Dock tool windows on same side vertically using MVVM

Docking/MDI for WPF Forum

Posted 3 years ago by Boleslaw
Version: 16.1.0631

Hi everyone,

Is it possible to vertically stack tool windows when docking them on one side using the new MVVM-friendly setup? For example, I have 2 tool windows. I would like to dock them both on the left side of the dock site, but the first should docked in the upper part of the left side and the other at the bottom of the left side. In the legacy docking product, we have accomplished this with some code based on your MVVM docking behavior example. We would like to use the new MVVM friendly functionality for this if possible.

Thank you.

Comments (3)

Answer - Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA


Yes absolutely!  Check out the "Default Locations" QuickStart since that shows you how to harness all the great new features related to supplying (even via code logic) information about where a docking window should appear when first opened.

Actipro Software Support

Posted 3 years ago by Boleslaw

Yes, I looked at that, but it looks like what I need to do cannot be done only in XAML via binding/setters (without additional supporting code) since it requires that an instance of IDockTarget be specified. That is fine, but I just wanted to make sure.

Looking further at that sample, it seems that there is an error in it. The WindowDefaultLocationRequested event handler checks tool window names, but all of the tool windows only have serialization ids set, therefore "Tool Window 6" does not end up on the intended Bottom side, under "Tool Window 5" (this intended behavior is what I was trying to describe in my question).

Thank you!

[Modified 3 years ago]

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA

Correct, you will need to use code-behind to do that more advanced docking scenario you described.

Good find on the sample bug.  We made that sample back when the constructor argument assigned to the Name property instead of SerializationId.  We'll fix it for the next build.

Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.