Home > Back-end >  UWP GridView/ListView: Can drag and drop responsiveness be modified?
UWP GridView/ListView: Can drag and drop responsiveness be modified?

Time:06-28

I'm looking for a way to modify two particular visual aspects of the built-in drag and drop behavior for (UWP) ListView and GridView.

First, when trying to reorder items, there is a delay before the UI reacts. You need to hold an item over another for a short time (maybe a few hundred ms) before the reorder animation visuals begin.

Second, the threshold/distance an item needs to be dragged to trigger the reorder response is relatively large. It's less noticeable if the items in question are very small, but that's not a typical scenario, especially for GridView items.

These two factors together can potentially make UI responsiveness feel rather clunky. At times, the UI even lumps adjacent items together.

Assuming it's even possible, what I would like to do is remove the animation start delay and shorten the threshold trigger distance. But I haven't been able to find any properties that influence these particular aspects. I've tried removing or modifying the theme transitions, but it had no effect. I also experimented with various size/margin/padding/etc. combinations, as well as different combinations of selection and drag/reorder property values.

Here's a simple example to demonstrate this behavior. (Tested on Win11 and Win10.)

<GridView CanDragItems="True" CanReorderItems="True" AllowDrop="True">
    <Rectangle Height="100" Width="100" Fill="Red"/>
    <Rectangle Height="100" Width="100" Fill="Blue"/>
    <Rectangle Height="100" Width="100" Fill="Green"/>
    <Rectangle Height="100" Width="100" Fill="Yellow"/>
    <Rectangle Height="100" Width="100" Fill="Purple"/>
    <Rectangle Height="100" Width="100" Fill="Orange"/>
</GridView>

Thanks in advance!

CodePudding user response:

Can drag and drop responsiveness be modified?

I have to say there is no such api could edit start delay and shorten the threshold trigger distance, it is internal, if you do want to edit this, please go ahead send your requirement with windows feedback hub app. You could find the Feedback Hub in the Start Menu. Please select Developer Platform->API Feedback as the category when you submit your request. The related team will check the request.

  • Related