So the structure of my tree is something like:
Problem 1: When I drag and drop GrandChildObject1 to ChildObject2, the collection in ChildObject1 calls its Delete method, and I don't want that, since there's a few steps I need to do before removing GrandChildObject1 from ChildObject1.
Problem 2: When I drop GrandChildObject1 into ChildObject2, there's a few steps I need to do before finally adding GrandChildObject1 to ChildObject2. So doing this, also triggers the Add Method, so I end up having two children of the same item (one added by the TreeView itself, and one I add with my own method in the TreeView.RadTreeView_DragEnded event).
So, is there a way to prevent the TreeView from handling this, and not losing the little Drag&Drop preview when the drag starts? I just want to disable the TreeView from triggering a change in the Collection. I found out it was doing it by setting a breakpoint here:
|private void GrandChildren_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e) |
| this.NotifyPropertyChanged("GrandChildren"); // breakpoint here |
EDIT: The collection of GrandChildren is an ObservableCollection<T>, and I can't change that to BindingList<T> or List<T>