Skip to content
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

DataGrid UseDefaultDragAdorner with muliple selected rows #441

Open
std8590 opened this issue Apr 21, 2022 · 1 comment
Open

DataGrid UseDefaultDragAdorner with muliple selected rows #441

std8590 opened this issue Apr 21, 2022 · 1 comment
Labels

Comments

@std8590
Copy link

std8590 commented Apr 21, 2022

If I select one row in the datagrid and drag the row using "UseDefaultDragAdorner" I get this:
grafik
when I select multiple rows I don't get the DragAdorner.

Steps to reproduce the behavior:

  1. Start the Showcase of the repository
  2. Select DataGrid Tab
  3. uncheck UseDefaultEffectDataTemplate
  4. check UseDefaultDragAdorner
  5. Select one row and drag
  6. Select multiple rows and drag to see the differences

I would expect the same behavior with multiple rows.

If I fix the file DragDropPreview.cs line 238
from:
if (!this.UseDefaultDragAdorner && itemsCount <= maxItemsCount)
to
if (this.UseDefaultDragAdorner && itemsCount <= maxItemsCount)

it works!

@dcm99
Copy link

dcm99 commented Nov 14, 2024

It would be nice if the DefaultAdorner could also be used for multiselection, but if one of the selected elements is no longer in the viewport, it may have been unloaded by the virtualization. It is therefore better to use a DragAdornerTemplate for multiselection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants