C#C
C#17mo ago
FaNim

[WPF] DragDrop problems

private void ListBorder_MouseMove(object sender, MouseEventArgs e)
{
    if (e.LeftButton != MouseButtonState.Pressed) return;
    if (sender is not Border border) return;

    DragDrop.DoDragDrop(border, new DataObject(typeof(IPlayer), border.DataContext), DragDropEffects.Move);
}

so iam trying to do drag and drop and iam getting this error no matter if i use dispatcher and cant try catch because this exception not allowing me clicking anything in ui because its stuck on dragdrop:
https://pastebin.com/mBk2aRUw
image.png
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?