How to create WPF Usercontrol using MVVM?

Jun 8, 2009 at 2:03 AM

Hi everyone,

I was wondering if anyone could re-direct me to a sample on the web on how to create a wpf usercontrol from scratch using MVVM pattern.

I'm not sure how to go about it as all the samples I see seem to have the application's window with the Exit menu but none are showing you on how to build a usercontrol using MVVM.

Thanks.

Thierry

Coordinator
Jun 8, 2009 at 1:25 PM

The sample code here, http://msdn.microsoft.com/en-us/magazine/dd419663.aspx, has UserControls that are part of the MVVM pattern.  Is this what you're looking for?

Jun 9, 2009 at 1:55 AM

Hi,

No, not really but thanks for the article. It explains it well, but I'm looking for some sort of lab that would allow me to go through step by step on how to build a usercontrol but not a full application. Once the usercontrol is build, I'd like to included in an test application which includes the basic window as created by .net 2008 mvvm template in order to test it.

Am I making sense?

Thanks.

T.

Coordinator
Jun 10, 2009 at 7:27 PM

Hi Thierry-

Great suggestion, and it does make sense. We'll consider it for an upcoming release of the M-V-VM toolkit, as the first version (0.1) was really a starting point, and we're going to be updating the samples so as to cover a wider range of topics.

Thanks!

Patrick

Jun 11, 2009 at 4:58 PM

Hi,

Sorry delay getting back, but my laptop died on me last night, so I had to deal with this first. Anyway, thanks for the kind words. It would great to have such a sample. I'm still looking around for more sample and explaination on where to start with M-V-VM pattern. If I find anything I might post them here if that's ok?

Looking forward to your updated samples.

Cheers.

T.