-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag and drop: setting DragUIOverride.Caption after async code triggers a COM exception #9296
Comments
Use The |
I tried with I also tried using |
This was interesting to play with. After testing I came to the same conclusions as found here #8108, which describes the issue and what is happening at a lower level. The final reply states this is "by design". I don't think that is a great way to word it, but rather this is just what happens due to how the event processing system interacts with the DataExchangeHost. Using a synchronous handler with @JJBrychell Perhaps the Better yet, |
|
Closing as dup of #8108 |
Describe the bug
Drag and drop: setting
DragUIOverride.Caption
after async code triggers a COM exception that has no message.Without the async call it works fine. Actually, if I catch the exception, the caption is set, however the drag and drop becomes broken and works only once. The subsequent times I try to drop a file, the
DragOver
is called, but setting values does nothing and the file is not accepted.Tried with release and prerelease Nuget package.
Maybe I misunderstand how to filter the file type that can be dropped and there is a way of doing it without an async call?
Steps to reproduce the bug
MainWindow
add any element (StackPanel
,RelativePanel
...) withAllowDrop="True"
andDragOver="DragOver"
DragOver
event handler paste the following code:e.DragUIOverride.Caption = "TEST"
statement will throw a COM exceptionExpected behavior
The drag and drop should work without exceptions and multiple times.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.4.4: 1.4.231219000
Windows version
Windows 10 (21H2): Build 19044
Additional context
Actual OS build: 19045.3930
The text was updated successfully, but these errors were encountered: