Exemple #1
0
        void IDropable.Drop(object data, int index)
        {
            ElementViewModel item = data as ElementViewModel;

            if (item != null)
            {
                if (list.Where(i => i.ID == item.ID).Count() == 0)
                {
                    CandidateViewModel dropItem = new CandidateViewModel(new Model.Node
                    {
                        Id        = item.ID,
                        FirstName = item.FirstName,
                        LastName  = item.LastName
                    });
                    list.Insert(index, dropItem);
                    this.List = list; //refresh view
                }
            }
        }
Exemple #2
0
 internal void Remove(CandidateViewModel i)
 {
     list.Remove(i);
     OnPropertyChanged("List"); //refresh view
 }