Repository navigation
Description
Current behavior 🐛
Moving the selected data item between hierarchical NavigationView groups can leave IsChildSelected set on its former ancestors. Collapsing an unrelated former parent then moves the selection indicator to that group although SelectedItem still identifies the original leaf. Selecting a root item can also set its own IsChildSelected flag.
Expected behavior 🎯
Only the current ancestors of the selected item report IsChildSelected. Removing selection or recycling an ancestor clears the flag. Collapsing an unrelated group does not take the selected leaf's indicator.
How to reproduce it (as minimally and precisely as possible) 🔬
- Bind a left NavigationView to two groups with
ObservableCollectionchild sources and expanded NavigationViewItem containers. - Select a leaf under the first group.
- Remove that same data object from the first collection, add it to the second, and set
SelectedItemto that object. - Collapse the first group.
- Observe the indicator on the unrelated group while
SelectedItemremains the leaf in the second group.
The accompanying PR contains runtime tests with the complete minimal setup, plus cases for insertion before a selected ancestor, three-level hierarchy, pane-mode rebinding, clearing selection and a collapsed destination.
Workaround 🛠️
No application-side mutation of IsSelected or IsChildSelected is used.
Renderer 🎨
- Skia
- Native
Affected platforms 📱💻🖥️
Desktop (X11), reproduced with the real NavigationView tree. Other platforms have not been runtime-validated for this report.
Uno.Sdk version (and other relevant versions) 📦
Uno.Sdk 6.7.22 / Uno.WinUI 6.7.103 (source cd452e3ee242c9a2a8dee5e65ad8088b6f5dbf83). The stale-index cleanup is also present on current master 0a4053a40b7bc7fe5f7a0ef5aaa890c5cd5e7a6d and current release/stable/6.7 by source inspection.
IDE version 🧑💻
.NET CLI 10.0.400 on Linux x64.
Anything else we need to know? 💬
A development build of the equivalent fix at the 6.7.103 source passed 27 collection-migration steps and 96 realized-container samples, followed by native pointer collapse, keyboard activation and focus-release migration. This is a source-built development comparison, not a published package validation. Full upstream runtime CI remains required.
Activity