Skip to content

ItemsView "Extended" selection does not behave the same as ListView when clicking already selected item #11074

@joelspadin

Description

@joelspadin

Describe the bug

On a ListView with SelectionMode="Extended", if you use Ctrl/Shift+Click to select multiple items, then you click one of the selected items, it resets the selection to just the clicked item.

On an ItemsView with SelectionMode="Extended", doing the same thing makes no change to the selection.

Why is this important?

This behavior isn't consistent with other Windows apps (e.g. File Explorer, Outlook, etc.). It also means that if you select everything (Ctrl+A) and then want to go back to just selecting one item, the way to do that is not obvious. You have to first Ctrl+Click an item to deselect it, and then you can click the unselected item to reset the selection to just that item.

Steps to reproduce the bug

  1. Open WinUI 3 Gallery and go to the ListView page.
  2. In the ListView with Selection Support example, set the SelectionMode to Extended.
  3. Click in the list and press Ctrl+A to select everything.
  4. Click on a single item. The selection reset to just that item.
  5. Go to the ItemsView page.
  6. In the ItemsView item invocation and selection example, set the SelectionMode to Extended.
  7. Click on the list and press Ctrl+A to select everything.
  8. Click on a single item. Nothing changes.

Actual behavior

Clicking on an already-selected item does nothing.

Expected behavior

Clicking on an already-selected item should reset the selection to just that item.

Screenshots

No response

NuGet package version

1.8.260416003

Windows version

Windows 11 (24H2): Build 26100

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-ItemsViewarea-ListsListView, GridView, ListBox, etcbugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions