Open jascam opened 6 years ago
Hello N2Cheval
Thank you for using our sample request service! (http://1code.codeplex.com/wikipage?title=NEW%2c%20FREE%20Code%20Sample%20Request%20Service%20from%20Microsoft%20All-In-One%20Code%20Framework)
Could you please check my understanding of this code sample request? Are you requesting a sample of creating and showing a WPF window from ViewModel? Similar to these the scenarios in these two forum threads? http://social.msdn.microsoft.com/Forums/en/wpf/thread/384ea9a9-acc0-4e2d-a8a3-3e2f643cfa70 http://social.msdn.microsoft.com/Forums/en/wpf/thread/3b53d588-7fd5-49f0-b158-e3d9dfd0cf77
Could you please provide more detailed and specific description of the code sample request?
Thanks Jialiang Ge
This comment was posted by Jialiang on 11/1/2010
Yes, but more along the lines of below. http://blog.roboblob.com/2010/01/19/modal-dialogs-with-mvvm-and-silverlight-4/ http://caliburnmicro.codeplex.com/Thread/View.aspx?ThreadId=231921 I envision the extension WPF project which exposes read/write APIs that the Winform app calls, which the API's then call Modal Dialog WPF service Views which are allowed call others in the MVVM pattern to enable unit testing. I would guess that you need the mediator pattern to communicate between each ViewModel. I think I've got the "what" part concepts but as I'm new to both MVVM and WPF, the "how" part is escaping me. Maybe if this too large to put into a sample, then could you please point me to how I can break it down to learn each part separately?
This comment was posted by N2Cheval on 11/1/2010
This comment was posted by on 11/9/2010
This comment was posted by on 11/16/2010
Hi N2Cheval,
Thanks for sharing this feedback. Based on my understanding, it requests a "Window Service" like the "form services" in your post in WPF. This "Window Service" should be designed by mediator pattern, and we should register all ViewModels and Views in this service. "Window Service" can help us to communicate other ViewModels or Views form one, can show/close the View by it.
Since we are not very clear this request, it is too abstract, we coded a DEMO about it and hope you can check it if it meets this request: please download from here (Skydrive space): http://cid-51b2fdd068799d15.office.live.com/self.aspx/.Public/ValuableSamples/MediatorPatternInWPFMVVM.zip
or the attached file.
Thanks.
This comment was posted by Jarrey on 11/16/2010
This comment was posted by on 2/7/2011
This comment was posted by on 2/21/2013
Code sample to enable WPF to extend Winform applications through new form services. Most WPF MVVM application assume that it is a single window application but this is not always the case, especially when extending and slowing replacing parts of a Winform application to become a WPF application. This needs to be unit testable.
Attachments
MediatorPatternInWPFMVVM.zip
Migrated CodePlex Work Item Details
CodePlex Work Item ID: '7526' Vote count: '3'