Issue: "Specified element is already the logical child of another element. Disconnect i
Note: I have tried this with both the June and July CTP bits.
Background: This issue occurs and the end of a succesful drag and drop operation between two XAML windows.
The source is a treeview that contains a Button control (could be another kind of control object, but I don't think it matters for this issue). That is drag and dropped unto a 2nd xaml window which is a Canvas.
I have tried the following code fragments:
_SelectedElement = (
UIElement)e.Source;this.RemoveLogicalChild(_SelectedElement);
DragDrop.DoDragDrop(_SelectedElement, _SelectedElement,DragDropEffects.All);
-AND-
_SelectedElement = (
UIElement)e.Source;this.RemoveLogicalChild(_SelectedElement);
ContentPresenter oContentPresenter =newContentPresenter();
oContentPresenter.Content = _SelectedElement;
DragDrop.DoDragDrop(_SelectedElement, _SelectedElement,DragDropEffects.All);
Also, I have tried wrapping a<ControlTemplate> around the "Source" Button control with no luck.
Any suggestions are welcome!
Thank you,
Alan

