Docking/MDI vNext - MVVM Property Improvements

by Avatar Bill Henning (Actipro)
Monday, August 24, 2015 at 8:48pm

PostBannerWPFControlsDevNotes

As mentioned in this previous post, we've been looking for ideas to further improve our WPF Docking/MDI product, which already is the market leader for docking tool window and MDI functionality.  We've committed to working on a complete internal restructuring of the product that we will call Docking/MDI vNext.  We're doing our best to keep the same general API surface, while providing even more advanced features in every area of the product.  We've collected suggestions from our customers over the past several years and are working to meet them as best we can with Docking/MDI vNext.

As mentioned in the previous post, we are currently working on enhancements for the MVVM support our Docking/MDI controls provide.  In today's post, I'd like to list some key updates that will improve MVVM usage.

IsOpen and IsActive Properties

In the current version of Docking/MDI, you are able to two-way bind to the DockingWindow.IsOpen property.  When set to true, the docking window will be opened and added to the layout.  Likewise, setting IsOpen to false will close the docking window and remove it from the layout.

For vNext, we're adding an IsActive property that effectively returns when DockSite.ActiveWindow is the docking window.  A number of customers requested that we add this property and make it settable.  If you bind to the property and set IsActive to true, it will not only open the window, but will also ensure it is activated (has focus).

State Property

The current version has a DockingWindow.State property, but it is read-only.  For vNext, we are adding a setter so that your view models can bind to it.  As an example, this allows you to create a new tool view model, set its State property to AutoHide, and then set IsOpen = true to effectively open the container tool window in auto-hide state.

No Need for an Attached Behavior

The current version requires an attached behavior for MVVM scenarios that would watch DockSite events and open/position docking windows appropriately.  With the various property and functionality enhancements we're making, this no longer is needed for common scenarios.

Specifying a Default Dock Location - Feedback Wanted

A next step we are going to be working on is how to specify the default location for tool windows that are created in MVVM scenarios.  We want your feedback for this.  Please let us know how you'd like to be able to specify that a container docking window should default dock to the right side of the dock site, or dock below another tool window, or attach to another tool window, or auto-hide to the bottom, or float at a location, etc. for MVVM scenarios.  Now is the time to submit your feedback for this feature.  Thanks for your help!

Tags: wpf, docking

Actipro's WPF Controls

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Learn More

Over 100 UI controls for building beautiful Windows Presentation Foundation desktop apps.

Includes editors, docking windows, MDI, property grids, charts, tree controls, ribbons, gauges, themes, and much more.

Learn More Download Free Trial

Add Comment

Please log in to a validated account to post comments.