Click here to Skip to main content
15,881,588 members
Articles / Desktop Programming / WPF

WPF/MVVM Quick Start Tutorial

Rate me:
Please Sign up or sign in to vote.
4.92/5 (699 votes)
10 Oct 2012CPOL11 min read 1.7M   61K   651  
A quick example of MVVM in WPF

namespace Example4
{
    /// <summary>
    /// Model of a 'song'.
    /// </summary>
    public class Song
    {
        #region Members
        string _artistName;
        string _songTitle;
        #endregion


        #region Properties
        /// <summary>
        /// The artist name.
        /// </summary>
        public string ArtistName
        {
            get { return _artistName; }
            set { _artistName = value; }
        }

        /// <summary>
        /// The song title.
        /// </summary>
        public string SongTitle
        {
            get { return _songTitle; }
            set { _songTitle = value; }
        }

        #endregion
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United Kingdom United Kingdom
Jack of all trades.

Comments and Discussions