WinUI3 MONZA::DdiThreadingContext Exception while drag and drop

164 Views Asked by At

I'm getting the below exception when dropping a dragged item (any item) and the Drop callback doesn't work. I tried declaring the callback in other components, but to the same result.

C++/WinRT version: 2.0.230706.1
WindowsAppSDK Version: 1.4.230913002

The error:

Microsoft C++ exception: MONZA::DdiThreadingContext<MONZA::AdapterTraits_Gen12LP>::msg_end at memory location 0x0000001AFB4FFDF0.

This is how I declare the callback:

<Border x:Name="BorderName"
        BorderBrush="{StaticResource BorderColor}"
        BorderThickness="1"
        Padding="16,8"
        AllowDrop="True"
        Drop="Image_OnDrop">

Any idea what could be the problem? The exception doesn't crash the app, but the drop callback is not called.

The stack trace:

>   KernelBase.dll!00007ffdc7454ffc()   Unknown
    igd10um64xe.dll!00007ffdb93e2830()  Unknown
    igd10um64xe.dll!00007ffdb98c1d9c()  Unknown
    igd10um64xe.dll!00007ffdb92c3aff()  Unknown
    igd10um64xe.dll!00007ffdb93b8b26()  Unknown
    igd10um64xe.dll!00007ffdb93f3d6a()  Unknown
    kernel32.dll!00007ffdc8c4257d() Unknown
    ntdll.dll!00007ffdc9caaa78()    Unknown
1

There are 1 best solutions below

0
Jeaninez - MSFT On BEST ANSWER

First, you need to add a background to the border.

And then you need to handle the DragOver event. You need to specify what kind of operations your app supports by using the AcceptedOperation property.

For more details you could refer to the Doc:Handle the DragOver event

And as far as I'm concerned, the exception can be ignored.