I am proud to announce the first release of Quince, an online repository of the world's most useful and usable UX patterns. As my first project at IG, I must say it has been an awesome experience being part of the Quince team. Having worked with cutting-edge technologies such as Silverlight 2 and in a extraordinary technical team was both fun and rewarding.
PS: One fun hidden feature: if you hold the mouse and shake the Explore By Tag graph, it will redraw it self again.
Thursday, July 31, 2008
Infragistics TabGroupPane Region Adapter for CompositeWPF (Prism) Applications
This is my first contribution (more to come soon) to the WPF world ! A Region Adapter for the Infragistics TabGroupPane* component.
For those not familiar with Composite WPF:
A View is a unit that encapsulates a portion of the UI and is kept as decoupled as possible from other parts of the application.
A Region is a container that holds Views to be displayed.
A Region Adapter adapts a Region to a WPF Control, thus displaying the actual contents of the associated Views.
I started adapting TabGroupPane since it was an immediate need for a prototype I am coding. As the prototype continues evolving, I think I'll be end up adapting other components of xamDockManager and maybe others of Net Advantage for WPF.
*TabGroupPane is a component of xamDockManager - A powerful docking and layout management control for WPF (http://www.infragistics.com/dotnet/netadvantage/wpf/xamdockmanager.aspx)
Usage
Register the TabGroupPane region adapter mapping in the Bootstrapper as shown in the code below:
To add views, just obtain the region and call the Add method as you do with other regions:
IRegion editorRegion = RegionManager.Regions[RegionNames.Editor]; ITabGroupPaneMetadata tabGroupPaneMetadata = new TabGroupPaneMetadata(); tabGroupPaneMetadata.Header=”Header #1”; MyView view = new MyView(); view.SetTabGroupPaneMetadata(tabGroupPaneMetadata); editorRegion.Add(view);
editorRegion.Activate(view);
Notice that in the preceding code I am also setting the TabGroupPaneMetadata attached property to the view (via Extensions Methods). This attached property is used by the TabGroupPaneRegionAdapter to set the Header property displayed on the associated TabGroupPane item.
Disclaimer This code is provided "AS IS" with no warranties, and confers no rights.
Download
You can get the TabGroupPaneRegionAdapter by downloading the latest change set of the CompositeWPF Contrib source control.