Selection Rectangle not moving along with datagrid content during scroll.

Anonymous
2024-04-10T12:30:47+00:00

I am attempting to replicate the selection behavior of Windows File Explorer within a WPF DataGrid. Specifically, I aim to implement a selection rectangle that mimics the functionality of File Explorer's selection mechanism. Currently, I have created an adorner rectangle to facilitate the selection of items. However, I encounter an issue when attempting to select rows while scrolling. As the DataGrid's content scrolls within its own ScrollViewer, the rows that are not intersecting with the selection rectangle are being deselected as the Selection rectangle is static and not moving along with the datagrid content during scroll. To provide a clearer understanding of the issue, I have included images below for reference.

Windows Windows Client for IT Pros Remote and virtual desktops

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-04-11T02:55:45+00:00

    Hello,

    From the description above, I understand that your question is about Windows Presentation Foundation.

    As there are no engineers dedicated to this topic in this forum. To obtain a prompt and efficacious resolution of your issue, I suggest posing your inquiry once more within the dedicated Q&A forum.

    Here is the link: Questions - Microsoft Q&A

     Click the "Ask a Question" button in the upper right corner to ask a question, then select the tag below.

    Regards

    0 comments No comments