Region Adapter for Actipro Docking System

Oct 9, 2008 at 3:39 PM
Edited Oct 9, 2008 at 3:43 PM

I submitted a patch the other day that contains a region adapter for Actipro's Docking/MDI System (part of their WPF Studio product).  It is similar to the Infragistics adapter, which also adapts a Composite WPF region to a Visual Studio-style docking layout, but with a few key differences:

  1. My adapter uses the same metadata interface for both tool windows and document windows, with different properties specifying how a view may be docked, and whether it is shown as a document or a tool window.  I think this is a little more convenient than having different metadata classes for tool windows and document windows.
  2. The Actipro MDI system supports both tabbed MDI and standard (windowed) MDI modes, and my adapter works fine with either.  In theory, it would also work seamlessly with a custom MDI model based on the Actipro APIs.

If you have any questions or need anything from me before including it in Composite WPF Contrib, please don't hesitate to ask.

Cheers,
Mike

Oct 21, 2008 at 5:35 PM
Edited Oct 21, 2008 at 5:50 PM
hi Mike, thanks for doing this~ 
I have a question for add DocumentWindow or ToolWindow.
var window1 =  new DocumentWindow( ?? what can I know the docksite instance);
_regionManager.Regions["DockSiteRegion"].Add(window1);
Could you write the simple example? Thanks very much.
Oct 21, 2008 at 5:49 PM
Edited Oct 21, 2008 at 5:52 PM
Hi Henry,

You should not need a reference to the DockSite, because you do not need to create the DocumentWindows or ToolWindows yourself.  If you add a view to the region, the DockSiteRegionAdapter will automatically create a ToolWindow or DocumentWindow to host the view.  You simply need to provide metadata.  This is easy in Xaml.  For instance, if your view is a UserControl, you could define your metadata as follows:
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:apcontrib="clr-namespace:CompositeWPFContrib.Composite.Wpf.Actipro;assembly=CompositeWPFContrib.Composite.Wpf.Actipro">
  <apcontrib:DockSiteRegionMetadata.DockSiteRegionMetadata>
    <apcontrib:DockSiteRegionMetadata Title="My Document Window" />
  </apcontrib:DockSiteRegionMetadata.DockSiteRegionMetadata>
  <!-- Your content here -->
</UserControl>
Then you just need to add the view (in this case a UserControl) to the region:

_regionManager.Regions["DockSiteRegion"].Add(myUserControl);
If you want a ToolWindow instead of a DocumentWindow, just set IsToolWindow="True" on the metadata.  If your view is not a DependencyObject, you can have your view implement the IDockSiteRegionMetadata interface instead of using the "DockSiteRegionMetadata" attached DependencyProperty.

Regards,
Mike
Oct 21, 2008 at 5:59 PM

Wow~ I understood how it works! Now i know how to do this.

Mike Actually you did big help for me! Would you mind i add your gmail to my gtalk?

Thanks a lot :)

Jan 28, 2009 at 1:41 PM
Hi,
Where can i find the pach to be able to work with active pro controls?
Regards Peter
Jan 31, 2009 at 4:24 AM
there is http://www.codeplex.com/CompositeWPFContrib/SourceControl/PatchList.aspx
Jan 12, 2011 at 6:35 AM

Hi,

Is it possible to get the patch updated for prism v4?

Thanks,

Ron