Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

TreeSelectionModelSelectionChangedEventArgs.SelectedItems Always contain one element even SingleSelect = false #384

@chenjing1294

Description

@chenjing1294

When I hold down Shift and click the left mouse button to select the next row, e.DeselectedItems.Count always equals 1, which is not the number of rows I selected.
When I hold down Shift and click the left mouse button to select across rows, e.DeselectedItems.Count is normal.

private void SelectionChanged(object? sender, TreeSelectionModelSelectionChangedEventArgs<FileTreeNodeModel> e)
{
    var selectedPath = Source.RowSelection?.SelectedItem?.Path;
    this.RaiseAndSetIfChanged(ref _selectedPath, selectedPath, nameof(SelectedPath));

    foreach (var i in e.DeselectedItems)
        System.Diagnostics.Trace.WriteLine($"Deselected '{i?.Path}'");
    foreach (var i in e.SelectedItems)
        System.Diagnostics.Trace.WriteLine($"Selected '{i?.Path}'");
}
Video_2025-09-09_151029.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions