private bool dragCommandCanExecute(Person obj) { if (obj == null) { this.DragDropMessage = "you cannot drop here"; return false; } bool result = obj.Age >= 18; if (!result) { this.DragDropMessage = "you cannot drag"; } return result; }
public Person Clone() { Person p = new Person(this.FirstName, this.LastName, this.Age); p.Moved = this.Moved; return p; }
private void dragCommandExecute(Person obj) { if (obj == null) return; this.CurrentPerson = obj; this.DragDropMessage = string.Format("Dragging '{0}'", this.CurrentPerson.ToString()); }