Getting started

Apr 17, 2010 at 12:03 AM
Edited Apr 17, 2010 at 12:29 AM

Hullo, it looks like in v3 the produced sample no longer matches the tutorial in  Now it just says "Welcome to MVVM Light".  Is there some place else I should be looking?  First time on MVVM.

To be more precise, there is nothing in the Model folder and no other ViewModel than the MainViewModel.  I went ahead and created a simple Person.cs and used the template to create a corresponding PersonViewModel.cs. 

    public class Person
        public string Name { get; set; }
        public int Age { get; set; }
    public class PersonViewModel : ViewModelBase
        private Person m_person;

        /// <summary>
        /// Initializes a new instance of the PersonViewModel class.
        /// </summary>
        public PersonViewModel()
            ////if (IsInDesignMode)
            ////    // Code runs in Blend --> create design time data.
            ////    // Code runs "for real": Connect to service, etc...

        ////public override void Cleanup()
        ////    // Clean own resources if needed

        ////    base.Cleanup();
However, it isn't clear how I ought to hook up Person and PersonViewModel.cs... (Ok, I can kind of guess, but would like to see the proposed way of doing it.)  At the top it says:
Use the <strong>mvvminpc</strong> snippet to add bindable properties to this ViewModel.
Apr 17, 2010 at 12:31 AM

Looks like there has been a previous comment on the removal of Item.cs.   If there a doc somewhere with guidance on the intent of the framework, that would be sufficient.  I can see it being annoying to keep removing the sample.

Apr 17, 2010 at 12:42 AM
Edited Apr 17, 2010 at 12:48 AM

In case anyone else was wondering, in the comments Laurent discusses the removal of the sample and intention to create a demo project with documentation.  In the meantime, I don't seem to be able to use the mvvminpc snippet...


Link to sample code here:

Apr 17, 2010 at 9:07 PM


You are right about the sample, it is my mistake, I should have added a note to the page in question. I will try to publish the sample tomorrow, I will announce it on my blog

I also intend to build a much larger reference application demonstrating all the features of the toolkit.

The mvvminpc snippet is used to declare a property that is bindable. It should normally appear when you type "mvvm" in a C# source code file. If it does not, it can be because you are not using the Visual Studio intellisense (are you using Resharper?) or because you installed in the wrong folder. The installation instructions for the code snippets can be found here:

Please comment on this thread if you still don't get the snippet to work. Thanks.


Jun 3, 2012 at 8:32 AM

I found this example very useful for understanding MVVM pattern : Model-View-ViewModel Pattern (MVVM)