Posted By: ajoy krishnamoorthy | Feb 27th @ 10:12 AM | 69,187 Views | 4 Comments

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.

Rating:
1
0

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:

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

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!

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?

Thanks

 

Nixon

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: http://compositewpf.codeplex.com/Project/Download/FileDownload.aspx?DownloadId=60148

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.

Microsoft Communities