Как добавить кнопку удаления для каждой строки в сетке данных (содержит два поля) в WPF. в то время как источник данных сетки данных
ObservableCollection<Result>
и
public class Result : INotifyPropertyChanged
{
public string FriendlyName { get; set; }
public string Id { get; set; }
public Result(string name, string id)
{
this.FriendlyName = name;
this.Id = id;
}
#region INotifyPropertyChanged Members
public event PropertyChangedEventHandler PropertyChanged;
void OnPropertyChanged(string property)
{
if (this.PropertyChanged != null)
{
this.PropertyChanged(this, new PropertyChangedEventArgs(property));
}
}
#endregion
}
}