Click here to Skip to main content
15,886,199 members
Articles / Desktop Programming / WPF

Modeling M-V-VM

Rate me:
Please Sign up or sign in to vote.
3.71/5 (8 votes)
5 Jun 2009CPOL2 min read 26.9K   312   23  
An article which tries to present an approach for decoupling M-V-VM View Model objects
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WorldDataLib.Model
{
    public class Continent
    {
        #region Members

        string m_strName;
        double m_lfSizeInSquareMiles;

        List<Country> m_Countries;        

        #endregion

        #region Properties

        public string Name
        {
            get { return m_strName; }
            set { m_strName = value; }
        }

        public double SizeInSquareMiles
        {
            get { return m_lfSizeInSquareMiles; }
            set { m_lfSizeInSquareMiles = value; }
        }

        public List<Country> Countries
        {
            get { return m_Countries; }
            set { m_Countries = value; }
        }

        #endregion

        #region Methods

        #region Ctor

        public Continent()
        {
            m_Countries = new List<Country>();
        }        

        #endregion

        #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
Software Developer
Israel Israel
Software Developer in a promising Clean-Tech company

Comments and Discussions