using System.ComponentModel;

namespace SilverlightApplication1
{
    public class ChartDataItem : INotifyPropertyChanged
    {
        private double yValue;
        private MenuItemsCollection menuItems;

        public event PropertyChangedEventHandler PropertyChanged;

        public double YValue
        {
            get
            {
                return this.yValue;
            }
            set
            {
                if (this.yValue != value)
                {
                    this.yValue = value;
                    this.OnPropertyChanged("YValue");
                }
            }
        }

        public MenuItemsCollection MenuItems
        {
            get
            {
                if (this.menuItems == null)
                {
                    this.menuItems = new MenuItemsCollection();
                }

                return this.menuItems;
            }
        }

        private void OnPropertyChanged(string propertyName)
        {
            if (null != this.PropertyChanged)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
