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

TreeView.SelectionChanged event not fired when invoking UnselectAll #17486

Open
AngryCarrot789 opened this issue Nov 12, 2024 · 1 comment
Open
Labels

Comments

@AngryCarrot789
Copy link

Describe the bug

When I call UnselectAll on my tree view, the selected items list gets called but no event is fired.

To Reproduce

Create a TreeView and fill it with some TreeViewItems. Then select an item and invoke UnselectAll, you will notice no SelectionChanged event is fired

Expected behavior

No response

Avalonia version

11.2.999-cibuild0048720-alpha

OS

Windows

Additional context

I insert TreeViewItems into the TreeView manually: this.Items.Insert(0, new TreeViewItem());. Maybe there is an issue with this technique?

@AngryCarrot789
Copy link
Author

Seems like the TreeView.SelectedItemsCollectionChanged method in the NotifyCollectionChangedAction.Reset case is checking if SelectedItems list has items which it wont since it's responding to a CollectionChanged event from said list

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

No branches or pull requests

1 participant