Exemplo n.º 1
0
 private void Items_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (ItemsPropertyChanged != null)
     {
         var eventArgs = new ItemsPropertyChangedEventArgs <T>(e.PropertyName, (T)sender);
         ItemsPropertyChanged(this, eventArgs);
     }
 }
Exemplo n.º 2
0
        private void People_ItemsPropertyChanged(object sender, ItemsPropertyChangedEventArgs <Person> e)
        {
            int index = People.IndexOf(e.Item);

            switch (e.PropertyName)
            {
            case "ID":
                Debug.WriteLine("ID({0}) is Changed. Value={1}.", index, e.Item.ID);
                break;

            case "Name":
                Debug.WriteLine("Name({0}) is Changed. Value={1}.", index, e.Item.Name);
                break;

            case "Age":
                Debug.WriteLine("Age({0}) is Changed. Value={1}.", index, e.Item.Age);
                break;

            case "Gender":
                Debug.WriteLine("Gender({0}) is Changed. Value={1}.", index, e.Item.Gender);
                break;
            }
        }