MVVM Session 01 – 02 Demo Source Code downloads.

I have received several comments and emails requesting the source code downloads for both Session 01 and Session 02 of the MVVM series on my YouTube channel. They are listed below.

DCOMProductions.MvvmDemo
DCOMProductions.MvvmDemo (Session 2)

10 Comments

  1. Glenn Selby

    Hi David.

    I was about to cus you out when i realized it wasn’t you, it was your audio delay. Here’s what i mean. I was watching the MVVM intro and lesson 02, maybe I didn’t notice in the intro, but in lesson 02…OMG. I would see you do something on the screen with NO explanation then several seconds later you would refer to it, by that time I was behind and had to constantly pause the video. This was consistent throughout lesson 02. It seems your audio is out of synch with the video. Have a look because otherwise it is VERY frustrating to try and follow along in Visual studio. Other than that, I learned a lot. Thanks.

    Reply
  2. Sudani1969

    Great job…
    i have a question if i want to use a database which technology you recommend and does EF is going to work as I’m going to start my first real world project soon and your tutorials could never come at better time for me..
    any advice will help specially the database side of MVVM..
    regards and keep up the good work

    Reply
    1. Sudani1969

      Hi Anderson please ignore my comments as i just discovered i can do that in one of your videos.
      Grrrrrreat work

      Reply
  3. Dhiren

    Hi,

    You have done great job. I am from C programming back ground and have working knowledge of C#. I have question about MVVM Session 02.

    there is indexer defined in Customer.cs
    public string this[string columnName]
    {
    get
    {
    if (columnName == “Name”)
    {
    if (String.IsNullOrWhiteSpace(Name))
    {
    Error = “Name cannot be null or empty.”;
    }
    else
    {
    Error = null;
    }
    }
    return Error;
    }
    }

    How does it called in code, I am not understanding. Because i don’t see any get access like customer[“Name”]!!!! Could you please explain this.

    Reply
    1. David Anderson (Post author)

      WPF (the underlying framework and bindings) calls your indexer. You must enable validation on error/exception on your binding though.

      Reply
  4. abhijith

    Hi in customerviewmodel save changes we are instantiating another view and assigning datacontext is this a good practice . Is there any cleaner way to do this ?

    Reply
  5. Wayne Russell

    Hi David,
    I have just watched your first 2 videos on MVVM which are really good.
    The main issue I have with MVVM is to try and follow a design program methodology when creating a MVVM application.
    Are you able to give any guidance on laying down the ground rules?
    Wayne Russell

    Reply
    1. David Anderson (Post author)

      As far as I have planned so far, I will be doing one more MVVM video where I build a small application, and I will be writing up a pattern and practice document on MVVM as well that you should be able to apply to a real-world application. These won’t help you short-term however, but I can recommend to you this book which I found helpful for applying MVVM in a practical manner. It answered some of my previously unanswered questions quite well.

      Reply
  6. Jobert

    Hi David,
    I’m actually new with WPF but I’ve been working with winforms for 2 years already and also I’ve been reading tutorial on WPF. I have this question that I can’t find on tutorial. Let say I have a grid with data on it and I wanted to add data without a need to refresh the collection viewmodel. Is this even a good idea or I should really need to refresh the collection’s data?

    Reply
    1. David Anderson (Post author)

      You should be able to do that just fine. You would bind the grid to the data, so adding data from the view would allow you to modify the collection without refreshing it. However, that doesn’t necessarily mean that data would be persisted (if it is a persisted collection, such as data from a database), so you would have to handle that. It really depends on what you mean by “add data without needing to refresh the collection.”

      Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: