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

How To Embed An Application Into a Docking Library

Rate me:
Please Sign up or sign in to vote.
5.00/5 (6 votes)
3 Sep 2011CPOL7 min read 29.3K   2.5K   19  
Step by Step conversion of an application into a Docking application component
/************************************* Module Header **************************************\
* Module Name:  Order.cs
* Project:      CSWPFMasterDetailBinding
* Copyright (c) Microsoft Corporation.
* 
* This example demonstrates how to do master/detail data binding in WPF.
* 
* 
* This source is subject to the Microsoft Public License.
* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
* All other rights reserved.
* 
* History:
* * 10/29/2009 3:00 PM Zhi-Xin Created
 * 
\******************************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace CSWPFMasterDetailBinding.Data
{
    class Order : INotifyPropertyChanged
    {
        private int _id;
        private DateTime _date;
        private string _shipCity;

        public int ID
        {
            get { return _id; }
            set
            {
                _id = value;
                OnPropertyChanged("ID");
            }
        }

        public DateTime Date
        {
            get { return _date; }
            set
            {
                _date = value;
                OnPropertyChanged("Date");
            }
        }

        public string ShipCity
        {
            get { return _shipCity; }
            set
            {
                _shipCity = value;
                OnPropertyChanged("ShipCity");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        public void OnPropertyChanged(string name)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(name));
            }
        }

        #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 States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions