Hello Aaron & Gary,
Thanks for the feedback!
Yes, I missed
the case of the empty ListBox, but that is just a matter of making it a drop target and checking for it in the DropQuery event, I added that to the ListBox Style and changed the handler so that it will check for this case.
The tricky bit here is where to place the black visual cue because there is no easy way to get the last item container of the ListBox. (Again, this is not a problem with Telerik ItemsControls :)).
Then the issue with the CheckBox is because of
mouse capturing. When a control captures the mouse, all mouse events will go through it an no other controls will receive mouse events. All button controls capture the mouse on mouse down, so after the mouse is pressed, the drag&drop will not receive mouse up events and therefore mouse movement will be considered a drag.
We used to capture the mouse during drag/drop just to guard against that case but then this was removed because controls (like ListBoxItem) needed mouse events to properly update their visual states.
There isn't really a way to check for mouse capturing unless you try to capture the mouse and do not succeed:
With the above code CheckBoxes function as expected.
The above check will be included in the next release of the controls, surely you do not need to deal with MouseCapturing issues :).
Note that I used two different item templates for a similar visual result but different behavior:
and:
I will update the example with the Q1 release as well, once it is out.
Sincerely yours,
Miroslav
the Telerik team