Monday, March 18, 2013

Prism? Infragistics? Dock and Ribbon? Oh my...

<xaml:Blog x:Name="Brian Lagunas" /> - XamDockManager–An Updated Prism Region Adapter

Last September, I wrote what has become a very popular Prism region adapter for the Infragistics XamDockManager control.  As pointed out in the post, this original XamDockManager Prism region adapter didn’t support all scenarios.  Frankly, it’s difficult to write a custom region adapter without knowing every usage of the control.  After receiving tons of requests for features and questions on how to implement certain scenarios, I have updated and refactored the XamDockManager Prism region adapter to support the most common requests.

So what was added?

  • Support for Activation – Before, there region adaptor supported IActiveAware from the View and ViewModel perspective.  Whenever a View or ViewModel was activated, the IActiveAware interface members would be invoked.  Unfortunately, the activated View would not become the active docking tab.  Now when you use the Region.Activate method within your code, the view being activated will now become the active docking tab.
  • Support for Remove – Before, when you would call the Region.Remove method, the view would be removed from the region, but the docking pane would still be visible.  The view would not be removed from the XamDockManager control itself.  This was because initially the requirements specifically didn’t support this.  I assumed closing of the panes would occur by the user clicking on the close button of the pane.  Now, whenever you invoke the Region.Remove method, the view will be removed from the region as well as the XamDockManager.  This was a highly request feature.
  • Support for floating panes – Before, the adapter didn’t have any support for floating panes.  Basically everything would work fine until you started tearing off panes and placing them in a floating state, or started to create complex nesting and stacking of panes.  Now, no matter how you have your panes organized, Region.Activate and Region.Remove will properly activate or remove the View form the region as well as the XamDockManager control.  This was by far the most requested feature.

...

CodePlex - WPF PRISM 4.0 and Ribbons

Project Description
Using Infragistics XamRibbon with WPF PRISM for building rich UI

Prism is the great Framework and sometimes some of the default .NET UI components doesn't quite work for certain scenarios (like RibbonBar and DockManager).
This project is about using Infragistics RibbonBar and later on if time permits Microsoft's Ribbon for WPF (which is provided separately) with Prism. So that we can utilize RibbonBar functionality quite smoothly with PRISM (without breaking MVVM and PRISM Extensiblity).

See Documentation for more information about concept and step by step guide.

If you have a look at SourceCode, it is quite easy to adapt this into another Ribbon Control.

xaml.tv - Building IG Outlook Part 7 – Adding the Contacts Module

This is the seventh video in a series that will take you step-by-step on building a Prism application that mimics Microsoft Outlook.  In this video, we added a new Contacts module to the application.  We went through the necessary steps to add this module to both the Silverlight and the WPF applications.  We created a new module, and added views, OutlookBar groups, and Ribbon tabs to the new module.  Along the way, we ran into some common issues that you may face when adding modules to a fully featured application framework and how you would resolve those issues

In the past week I've kicked off my first Prism project and have been climbing the learning curve bit by bit. We've also invested in Infragistics, so using the two together only seems smart.

Brian Lagunas (@BrianLagunas, http://brianlagunas.com/) has a number of cool examples and I found the WPF PRISM 4.0 and Ribbons project, which looks cool, as well.

What do I think about Prism? It's pretty cool and looks like its going to let me build my complex application without tight coupling and a nice separation of concerns. I've been describing it as Lego for WPF app building...

1 comment:

Brian Lagunas said...

Funny, I have a slide in my Prism talk that uses Legos to help represent the idea of Prism.