You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside the grid, place a new droptarget on a child element of the grid
Since I'm using MVVM I have a different ViewModel for the child element, thus also a different event handler
for dropping an element of a different type than dropped onto the parent Grid.
What is the expected output? What do you see instead?
The grid will handle the event and the dragOver event will never trigger on the child
What version of the product are you using? On what operating system?
1.1 on WinXP
Please provide any additional information below.
I circumvented this by adding a new property in DragInfo called "IsNotHandled" (inverted to apply default
behaviour in this case)
In the DragDrop class I changed the following code;
In the handler for my Grid I've added the following code:
publicvoidDragOver(DropInfodropInfo){if(dropInfo.DataisButtonLayoutViewModel||dropInfo.DataisJoystickLayoutViewModel){dropInfo.DropTargetAdorner=DropTargetAdorners.Highlight;dropInfo.Effects=DragDropEffects.Copy;}else{dropInfo.IsNotHandled=true;// Allows the event to bubble to the next element}}
This resolved my issue of allowing drop onto a child viewmodel on a viewmodel.
a drop target can now be placed on a child element of a grid, listbox or something else (more mvvm like)
the NotHandled property can be used to allow bubbling the drag over event.
Original author: b.a.roys...@gmail.com (May 21, 2010 06:45:03)
What steps will reproduce the problem?
Since I'm using MVVM I have a different ViewModel for the child element, thus also a different event handler
for dropping an element of a different type than dropped onto the parent Grid.
What is the expected output? What do you see instead?
The grid will handle the event and the dragOver event will never trigger on the child
What version of the product are you using? On what operating system?
1.1 on WinXP
Please provide any additional information below.
I circumvented this by adding a new property in DragInfo called "IsNotHandled" (inverted to apply default
behaviour in this case)
In the DragDrop class I changed the following code;
and
In the handler for my Grid I've added the following code:
This resolved my issue of allowing drop onto a child viewmodel on a viewmodel.
Original issue: http://code.google.com/p/gong-wpf-dragdrop/issues/detail?id=15
The text was updated successfully, but these errors were encountered: