Brought in code from DraggableCollectionView. Commiting before trying some experiements.