Search code examples
c#.netwpfdrag-and-drop

How do determine if drop was exactly with right mouse button up?


I implemented simple wpf drag and drop and it works good with left or right mouse button. But how can I determine if drop was exactly with the right mouse button? My drag'n'drop begins with DragDrop.DoDragDrop and ends with

private void OnDropChannelsCommand(DragEventArgs e)
{
    ...
}

e.KeyStates is allways DragDropKeyStates.None.


Solution

  • Finally I end up with handling DragEnter event with

    e.KeyStates == DragDropKeyStates.RightMouseButton
    

    check. Mouse.RightButton was set to Released for some reasons.