WPF, Crossbow, and the Composite UI Application Block (CAB)
So, you've invested a good deal of time in Windows Forms and even adopted the CAB Framework.  However, sometimes you see the need for some rich content.  An interesting approach to achieving this is using WPF; however, you don't want to re-write your application utilizing this new technology.  Microsoft has come up with a good story for providing interop between Windows Forms and the Windows Presentation Foundation in a technology termed Crossbow.  Now how does this play with CAB?  Actually, quite nicely, I created a user-control that is also a smartpart and used Elementhost (a Windows Forms control that can be used to host a WPF element) to host a WPF user-control in it.
   

    [SmartPart]
    public partial class CustomerWPFGrid : UserControl
    {
        private ElementHost host;
        private Example1 exGrid;

        public CustomerWPFGrid()
        {
            InitializeComponent();
            host = new ElementHost();
            host.Dock = DockStyle.Fill;
            pnlMain.Controls.Add(host);
            exGrid = new Example1();
            host.Child = exGrid;
        }
    }


At Infragistics, we have a lot of technology groups that are working on a host of different technologies.  One of those groups is our WPF Team and they've been working on a control called DataPresenter.  This control has two views, one that is a Carousel and one that is a hierarchical datagrid.  Since, I want to really show off what could be accomplished with WPF and CAB, I borrowed their work to host inside of the standard CAB application, Bank Teller.  Here's a screenshot for the end result!


BankShell
Posted: 08 Aug 2006, 16:32

Comments

Eugenio Pace - patterns & practices Client Architecture Guidance said:

Check out this cool example by Andrew Flick from Infragistics: http://blogs.infragistics.com/blogs/andrew_flick/archive/2006/08/08/292.aspx...
# August 10, 2006 1:50 AM

Bryant Likes's Blog said:

I'm starting a new project where we will be using Windows Presentation Foundation (WPF) . I've done very
# August 15, 2006 7:08 PM

Bryant Likes's Blog said:

I'm starting a new project where we will be using Windows Presentation Foundation (WPF) . I've done very
# August 15, 2006 7:09 PM

John said:

The Hierarchial Carousel viewer is amazing..wish everyone had .net 3.0 (winfx) framework on their system via xp sp2.
# August 21, 2006 4:17 PM

Kent Boogaart said:

Cool stuff. FYI, I have implemented a pure WPF layer for CAB. Download + details here: http://kentb.blogspot.com/2006/10/wpf-cab.html
# October 7, 2006 6:19 AM

Pedro Polonia (polonia2 at gmail.com) said:

Very good stuff.

# January 31, 2007 1:47 PM

gestibar said:

nice :)

;))

# February 13, 2007 5:08 AM

wjcking said:

that's cool, based on .net framework, beautful interface

# October 5, 2007 4:55 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS