views:

2752

answers:

3

Hi, I'm looking at using Composite WPF (Prism) for an application shell. I also like the WPF Syncfusion DockingManager and Ribbon Control - but the question is how do I get the Syncfusion controls to work with Composite WPF in a composite, multi-window application?

The application I have in mind will have a shell application with a ribbon tab, and when the user selects one of the buttons on the tab a new window/user control is opened within the shell containing a grid of business data, for example orders. The user can open multiple windows in this manner and all can all be docked/tabbed together much like the controls in Visual Studio. What I'd really like is to be able to add new modules to the shell and for the new module's buttons to be added to the tab control.

Can all of this be done now? Is this a good fit for Composite WPF? I'm new to this technology (currently winform) so just evaluating - but 1) how do I launch multiple windows/user controls that tie in and work with the regions used by CAL? 2) How do I make the multiple windows dock together in a way that works with CAL?

If this can be done, I'll need to be able to code this up as a prototype so any code references much appreciated.

Thanks in advance for any guidance. David

+1  A: 

I'm going to answer part of this question and it is, yes this can be done. You have two options on approaching the region question:

  1. You can try to fit your window management into the region concepts. You would essentially have to write (or find) a region adapter for the docking library you would like to use. Infragistics actually provides a CAL region adapter for their docking library that you could take a look at here.
  2. A different way of doing it is to create a service that provides an interface for modules to use to show windows. Register the service (call it IWindowManager) with your unity container and every module can call it. This is a more flexible way to go since regions out of the box don't have a concept of docking. It is true that this means that you will be skipping out on the region concept, but it is a trade off of flexibility vs "CAL-ness".

With regards to the Ribbon, your shell window will just contain a Ribbon control which either (1) all modules have access to or (2) you wrap a service around it so that all modules interact with it through your own interface (like #2 above).

Hope this helps.

siz
A: 

I'm having the same question as yours and I'm still in evaluation stage of different approaches but I'll share you my findings so far.

There has been some efforts to make a a RibbonRegionAdapter (google for it!)

These samples were on the Ribbon control provided within the WPF Futures, but you can modify the code to support your Syncfusion Ribbon.

To comply with CAL and Model-View-ViewModel, I think the View containing the Ribbon will be be bound to a ViewModel containing all commands. These commands would be exposed publicly and available to other modules to attach Executed and CanExecute handlers. It is possible also to expose a generic method to add commands at run time by providing their image and location on the ribbon.

For the docking manager, the Composite WPF Contrib Project on CodePlex contains a TabGroupPaneRegionAdapter for Infragistics TabGroupPane, I don't know about Syncfusion

modeeb
A: 

Syncfusion provides custom region adapter for Docking and Ribbon. They have nice CAL demo sample called Portfolio analyzer in their dashboard.

-Venugopal.

venugopal