G
Guest
Hi,
I'm using indexed properties in an object which acts as the binding source.
How can I implement INotifyPropertyChanged for that object so that when the
indexed property is updated, binding target is updated?
To be more specific please find the code below..
public class ClassA : INotifyPropertyChanged
{
public object this[int field]
{
get
{
//Some code
}
set
{
//Some code
OnPropertyChanged(); // What is the parameter for OnPropertyChanged call???
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propName)
{
if (this.PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}
#endregion
}
Thanks,
Gokul
I'm using indexed properties in an object which acts as the binding source.
How can I implement INotifyPropertyChanged for that object so that when the
indexed property is updated, binding target is updated?
To be more specific please find the code below..
public class ClassA : INotifyPropertyChanged
{
public object this[int field]
{
get
{
//Some code
}
set
{
//Some code
OnPropertyChanged(); // What is the parameter for OnPropertyChanged call???
}
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propName)
{
if (this.PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}
#endregion
}
Thanks,
Gokul