-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy function doesn't seem to work #162
Comments
@MrBigDog2U I'll fix this in the default drop handler by doing this var copyData = (dropInfo.DragInfo.DragDropCopyKeyState != default(DragDropKeyStates)) && dropInfo.KeyStates.HasFlag(dropInfo.DragInfo.DragDropCopyKeyState)
//&& (dropInfo.DragInfo.VisualSource != dropInfo.VisualTarget)
&& !(dropInfo.DragInfo.SourceItem is HeaderedContentControl)
&& !(dropInfo.DragInfo.SourceItem is HeaderedItemsControl)
&& !(dropInfo.DragInfo.SourceItem is ListBoxItem); for now, I don't know if we should prevent the copy action if target = source |
I don't think that's right either. From this condition, if the SourceItem My own expectations of what to do if (target == source) is that it would On Wed, Feb 3, 2016 at 8:01 AM, Jan Karger notifications@github.com wrote:
|
the SourceItem is different to VisualSourceItem. this is directly ListBoxItem or TreeVieItem etc if you have an ItemsControl without ItemsSource binding. so copy this is limited for now, cause it's not an easy way to do this. Von meinem iPhone gesendet
|
I need to be able to drag-copy from a listbox and drop into another listbox and the code seems to imply that this should be possible but it either doesn't work or I'm misunderstanding how it should work.
Using the "Bound ListBoxes" example, the lower ListBox indicates that holding the Control key should result in a drag-copy operation but it behaves exactly the same regardless of the state of the Control key - always moving from one list to another.
It looks like the moveData boolean expression in DefaultDropHandler.Drop is just wrong. It also appears that the drag-copy behavior is incompletely implemented in general. I made some changes that made the drag-copy operation behave a little more like I would expect but, when I dragged the copied item back to the source listbox, it duplicated it (I suppose that's a possible interpretation of what should happen but not at all intuitive).
The text was updated successfully, but these errors were encountered: