开发者

DoDragDrop() where data is aquired asynch

My application is a smart client using a WCF service. I have a ListView where items are filenames. Files data are stored server side.

When user drag an item from the list, th开发者_运维技巧e data is not client side yet. Instead of downloading the data up front on the ItemDrag event, I want to download the data from the server only when the item is droped (at MouseUp on Windows Explorer).

Is there a way to implement an AsyncDataObject (IDataObject) and pass it to Control.DoDragDrop() ? Or is there any other way that I can acheive this behaviour ?

Thaks


Fire an event from the Drop event after the drop is validated that will go ahead and fire off a query that will call back to update the UI with the new data.

This will need a loading indicator directly after the drop to invalidate the current area that the data is being plopped into.


What you are doing is dragging virtual content into Explorer. Here's an example in managed code. Here's another. In the first example, you would replace their GetFileContents with a version that downloaded the data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜