Skip to content

Fix ControlsList TreeView selection change handling to prevent blank-click updates - #813

Open
令琴怀雅 (Roshaless) wants to merge 1 commit into
microsoft:mainfrom
Roshaless:fix-controlslist-treeview-selection-blank-click
Open

令琴怀雅 (Roshaless) wants to merge 1 commit into
microsoft:mainfrom
Roshaless:fix-controlslist-treeview-selection-blank-click

Conversation

@Roshaless

@Roshaless 令琴怀雅 (Roshaless) commented Sep 14, 2026

Copy link
Copy Markdown

Replaced PreviewMouseLeftButtonUp with SelectedItemChanged in the ControlsList TreeView. The old mouse-up handler manually raised selection changes, so it fired even when no item was actually clicked. Clicking blank areas would keep updating the current selected item. Now the handler only runs when the selection truly changes.

Screen recording:

2026-09-14.16-30-04.mp4
Microsoft Reviewers: Open in CodeFlow

- The mouse-up handler manually raised selection changes even when no
item was clicked, causing repeated updates while clicking blank areas.
Replaced it with the SelectedItemChanged event, which only fires when
the selection actually changes.
@Roshaless

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant