Creating a modular application using Prism V2 - Screencast 3/4 : Implementing views and services

Download this episode

Download Video


In this 4 part series, Bob Brumfield and Erwin van der Valk from patterns and practices shows you how to build a modular application using the recently released Composite Application Guidance for WPF and Silverlight - February 2009 (also known as Prism V2).  

Part 3. Implementing views and services:

This webcast demonstrates how to create a view using the Model – View – ViewModel pattern, and how to create and inject Services into your classes by using the Unity Dependency Injection Container. 

For Part 4 of 4: Decoupled Communication

Bob Brumfield and Erwin van der Valk are both Software Development Engineers at Microsoft patterns & practices and have both worked on the Prism V2 project.



Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image

      First of all, nice demo!

      Second of all, I have been trying to port this demo to a WPF application and I've stumbled into a HeaderInfo issue. I am setting the HeaderInfo property as in the demo, and then I am creating either an ItemTemplate or as in the demo an ItemContainerStyle where I set either the HeaderTemplate or the Header property. Nothing works!

      I used this:

      <Style TargetType="TabItem">
      <Setter Property="Header" Value="{Binding Path=HeaderInfo,Mode=OneWay,FallbackValue='Error!'}"/>

      Every attempt "Error!" is displayed. I tried binding to . (dot) to see what the DataContext was, but again, error was displayed. What am I doing wrong?! And please escuse the noobicity of this question, this is my first WPF app, but puh-lease, someone answer this!

    • User profile image

      Hi there, couldnt agree more, this demo really helps out grasping the Prism, amazing.

      Im wondering in short if the source code is available for download so i can "play" with it?




    • User profile image

      Could you please provide the source code, or at least the bits that you pasted in? (the style resources). Thanks.


      Later Edit:

      I found that codeplex had a link to the source code for the series: Here it is:

    • User profile image

      I got a similar problem when trying to follow this demo. In my experiment with the original Silverlight demo the binding on the tab control header does not work. I could only user static texts on the header using the TabControlRegionAdapter, and once I use binding the tab control header shows nothing.


      I am also wondering what might be the cause of this problem.

    • User profile image

      I've tried following everything, but it isn't clear to me from this screenscast how the ViewModel gets instantiated.  Where's the "new" call for DiggSearchResultsViewModel and what calls the DiggSearchResultsView constructor *with* the DiggSearchResultsViewModel parameter?  I assume that the DiggModule's registration of the view with the region will transparently call the default constructor for DiggSearchResultsView, but how does the parameterized constructor factor in?

    • User profile image

      If I register view1 from ModuleA to "MainRegion" in my shell, and I also register view2 from ModuleB to "MainRegion" , how can I switch back-and-forth between them (i.e. visually how can I display them). I have an example of this but neither view shows up (it is as though they are overlapping one another and prevneting each other from becoming visible).....??

    • User profile image

      Just wondering, why is this video so poor in quality for such a majorly important topic?

    • User profile image

      That was same problem I was having.  I saw in this video a clue, go to the stock trader example and see what happens on the click which changes the view...

    • User profile image
      Joe Kahl

      This editor is messed up.  I cannot paste my code in here to save my life!



      My Microsoft.Practices.Composite.Presentation.Regions assembly does not have the TabControlRegionAdapter.ItemContainerStyle.

      You mentioned that you extended this.  If you provided this as an exmaple you need to provide the extension.




    • User profile image

      I can't see this video.


    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.