/// <summary> /// Crawls the VisualTree of the given UIElement and registers all /// elements participating in the DragDrop framework. /// </summary> /// <param name="startingWith"></param> public void RegisterAllDragDropParticipants(UIElement startingWith) { startingWith .FindAllElementsByType<IDragDropSource>() .Where(o => !_sources.Contains(o)) .Subscribe(RegisterDragDropSource); startingWith .FindAllElementsByType<IDragDropTarget>() .Where(o => !_targets.Contains(o)) .Subscribe(RegisterDragDropTarget); }