Open marcelwgn opened 4 years ago
Copying @ranjeshj from #3015 for context: We will only update selection with items whose IsSelected property was set when they are visible in the VisualTree. The order would be: latest item loaded wins.
@anawishnoff @YuliKl FYI.
Hi, is there any progress with this issue? I am experiencing a lot of difficulty in programmatically updating the hierarchy, and I think it is this issue. (WinUI3 in Desktop, SDK 1.0)
If this doesn't make sense, I can create a sample repo. I added a sample repo https://github.com/tuggernuts/NavViewTestApp
Also, is there a workaround I'm missing @chingucoding @StephenLPeters
Bump for #8638 since this is still an issue.
@chingucoding would you be able to attach a repro app please ? The link above does not work and might not be the same issue as the primary bug.
Sorry for the delayed response, this must have flown past. Attached project repros the issue. App1.zip My guess would be that unrealized items don't actually get created and as such don't register to the NavigationView. Because of that, the NavigationView in turn doesn't know about the existence of that item or its selection.
Describe the bug
Steps to reproduce the bug
Create a NV with hierarchical NVI defined in XAML and set
IsSelected
to true on one of the child items. In the loaded event handler of that NV, observe howSelectedItem
is null.This behavior is also present when setting the IsSelected property later, as long as the item has not been rendered.
Expected behavior
The NV should know that one of it's children where selected. Screenshots
Version Info
NuGet package version:
latest commit
Additional context