When dragging and dropping ListView items, use e.Data.SetDataProvider (StandardDataFormats. StorageItems, MyDataProviderHandle)
; Unable to implement delayed data provision.
#9629
Labels
area-Lists
ListView, GridView, ListBox, etc
bug
Something isn't working
team-Controls
Issue for the Controls team
Describe the bug
When dragging and dropping ListView items, use
e.Data.SetDataProvider(StandardDataFormats. StorageItems, MyDataProviderHandle)
; Unable to implement delayed data provision.I want to use
e.Data.SetDataProvider()
to delay providing data because I have a very time-consuming operation (decompressing files), but when dragging, it displays a prohibition symbol and cannot complete sharing files. According to the official documentation, this method is specifically designed to handle time-consuming operations, but we are unable to provide this requirement at this time. I am not sure if there is a problem with my code.Steps to reproduce the bug
My Code
I use
![屏幕截图 2024-05-13 171000](https://private-user-images.githubusercontent.com/67247524/329996315-6c164a33-f28c-41b9-a10b-fb769fdb2308.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTk2MDcsIm5iZiI6MTcxODUxOTMwNywicGF0aCI6Ii82NzI0NzUyNC8zMjk5OTYzMTUtNmMxNjRhMzMtZjI4Yy00MWI5LWExMGItZmI3NjlmZGIyMzA4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE2VDA2MjgyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThiM2NiM2QzZDVmYzNjZGY3MzgxZWVhZDZhMzZhNTE1MDA2MmYxZjZlM2M1OGU4YjAzNDJkNjFlOTVlNTBlMmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RDZlT5ByS_Ptwi57uq_reyBvMyEQlqPmDMmgmD2Twtw)
Task.Delay(10000)
to simulate time-consuming tasksI have set the DragitemsStarting event handler
FileList_DragitemsStarting
in the ListView.I dragged the control to the desktop.
Expected behavior
No response
Screenshots
Unable to drag
I dragged the control to the desktop.
![屏幕截图 2024-05-13 170900](https://private-user-images.githubusercontent.com/67247524/329996288-c5d8ade4-463f-4796-95c0-40d57947460f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTk2MDcsIm5iZiI6MTcxODUxOTMwNywicGF0aCI6Ii82NzI0NzUyNC8zMjk5OTYyODgtYzVkOGFkZTQtNDYzZi00Nzk2LTk1YzAtNDBkNTc5NDc0NjBmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE2VDA2MjgyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiYjFmZTUyNGQxNTNhNTE5NjI0ZjBiMGM2MzVhMGI5YWViYzIyN2U4NjRjZjBiYjY4OGI0ZTZkZjNhZWYwNGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.EPyg6dq_6j-RQf7sI7vAH4rTgEHf0tf_cl5xjNmSioA)
Official documents
NuGet package version
WinUI 3 - Windows App SDK 1.5.3: 1.5.240428000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: