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

namespace RadTreeListView_ComboBoxColumn_WPF
{
	public class Country :INotifyPropertyChanged
	{
		public event PropertyChangedEventHandler PropertyChanged;
		

		private int id;
		public int ID
		{
			get
			{
				return this.id;
			}
			set
			{
				if (this.id != value)
				{
					this.id = value;
					this.OnPropertyChanged("ID");
				}
			}
		}

		private string name;
		public string Name
		{
			get
			{
				return this.name;
			}
			set
			{
				if (this.name != value)
				{
					this.name = value;
					this.OnPropertyChanged("Name");
				}
			}
		}

		protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
		{
			PropertyChangedEventHandler handler = this.PropertyChanged;
			if (handler != null)
			{
				handler(this, args);
			}
		}

		private void OnPropertyChanged(string propertyName)
		{
			this.OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
		}

		public static ObservableCollection<Country> GetCountries()
		{
			ObservableCollection<Country> countries = new ObservableCollection<Country>();
			countries.Add(new Country() { ID = 1, Name = "Spain" });
			countries.Add(new Country() { ID = 2, Name = "UK" });
			countries.Add(new Country() { ID = 3, Name = "The Netherlands" });
			countries.Add(new Country() { ID = 4, Name = "France" });
			countries.Add(new Country() { ID = 5, Name = "Wales" });
			countries.Add(new Country() { ID = 6, Name = "Czech Republic" });

			return countries;
		}
		




	}
}
