Creating a modular application using Prism V2 - Screencast 3/4 : Implementing views and services
- Posted: Feb 27, 2009 at 10:12 AM
- 90,510 Views
- 10 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
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).
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.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
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.
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?
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).....??
Just wondering, why is this video so poor in quality for such a majorly important topic?
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...
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.
Joe
I can't see this video.
Remove this comment
Remove this thread
close