-
Notifications
You must be signed in to change notification settings - Fork 678
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
If the NavigationView's SelectedItem is set after having set the ItemsSource the NavigationViewItem is not selected. #9185
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you! Open similar issues:
Closed similar issues:
|
IMO, you should provide a minimal repro sample rather than a large multi-platform project with many extraneous references. ~I couldn't run it unless I installed things I have no use for. |
@kmgallahan, I attach the solution with the Windows target framework only. |
This is not a minimal repro: <PackageReference Include="Uno.Resizetizer" Version="1.2.1" />
<PackageReference Include="Uno.WinUI" Version="5.0.48" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231008000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
<PackageReference Include="Uno.Material.WinUI" Version="4.0.6" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.0.48" />
<PackageReference Include ="Prism.Core" Version="8.1.97"/> This is a minimal repro from making a new app from the standard template and copying over bits of your code: https://github.com/kmgallahan/NavSelectedItemSample and it shows the NavigationView working as expected. You should start eliminating or adding dependencies and complications in a test project until you find what is causing your problem. Edit: I'm guessing it a problem with the uno skin / style implementation. |
Thanks for reporting this @Suriman, and thanks @kmgallahan for investigating. I'm closing this for now since it seems to be an external issue. Please reopen if you've identified the problem to be something on WinUI 3. |
Describe the bug
When setting the SelectedItem of a NavigationView after having set the ItemsSource, the NavigationViewItem which has to be selected doesn't select.
Steps to reproduce the bug
1 - Open the attached sample and compile it.
2 - Execute the NavigationViewSelectionDisappears.Windows project as Package.
3 - You'll see that the NavigationViewItem is not selected.
Expected behavior
The NavigationViewItem has to be selected.
Screenshots
No response
NuGet package version
None
Windows version
No response
Additional context
The text was updated successfully, but these errors were encountered: