Wednesday, April 22, 2009

Composite Extensions for Prism 2

I figured that since I wrote my original composite extensions for Prism 1 on an airplane, I should keep up the tradition. On the way home from speaking in Evansville Indiana last night (not surprisingly on Prism), I got all the code in my composite extensions updated to Prism 2.

So if you like the modularity and pub-sub events story from Prism and would like to be able to do those same things in a Windows Forms or other kind of .NET application, you can easily do so now with these CompositeExtensions.

These extensions allow you to use the modular loading patterns and capabilities of Prism as well as the pub/sub events in a Windows Forms application, or any other kind of application (even console apps, WCF services, etc.).

The key pieces remain the same:

A CompositeEvent class that has all the same capability as the CompositePresentationEvent class in Prism2, but is not tied to the WPF libraries at all. For the UI thread dispatching capability, it uses the SynchronizationContext class (which is used under the covers by both WPF and Windows Forms, so this class will also work with WPF).

A SimpleUnityBootstrapper class that removes the tie to WPF in the bootstrapper by removing the creation of the shell and the region adapter stuff.

The  code also include a sample Windows Forms application that uses the extensions to load a module and fire and handle pub-sub events. As mentioned in the original post, I also demonstrate a simple way of using the DI container (Unity in this case) to achieve a Region-Manager like UI composition ability in Windows Forms.

Check it out and let me know if you have any feedback.





Wednesday, April 22, 2009 7:34:08 PM (GMT Standard Time, UTC+00:00)
Comments [4]  | 


Thursday, April 30, 2009 8:01:14 PM (GMT Standard Time, UTC+00:00)
Hi,
I was wondering if you had sample code that showed how to use IActiveAware in Prism. I have searched for samples but in vain.

BTW, I liked your screencasts on Prism so far. Any chances of showing how to use IActiveAware in any upcoming screencasts?

thanks,
Arun
Arun Nair
Monday, May 18, 2009 1:01:30 PM (GMT Standard Time, UTC+00:00)
Hi Bryan,
Nice to see you're still working on Win Forms usage of Prism.
Greetings,
Sergiu Damian
Saturday, May 23, 2009 5:59:51 AM (GMT Standard Time, UTC+00:00)
Badly need your help. I see first time your site guys. I like you. Help me! Can not find sites on the: Turbo Tax. I found only this - turbo tax. Florida alcohol and drug abuse association annual conference prevention and treatment of these and other drug abuse and misuse. A glossary of terms related to drug abuse, alcohol abuse and addiction treatment. Thank you very much :mad:. Lisette from Turkmenistan.
Friday, June 05, 2009 5:26:54 AM (GMT Standard Time, UTC+00:00)
Badly need your help. I see first time your site guys. I like you. Help me! Can not find sites on the: Turbo Tax. I found only Maple Story mesos
Comments are closed.









Ads by Lake Quincy Media









Sign In
Copyright © 2006-2007 Brian Noyes. All rights reserved.
Advertise on this site through Lake Quincy Media
designed by NUKEATION STUDIOS