Latest prerelease hitting an issue with only the first item being shown in NavigationView (Xaml Island scenario)
See original GitHub issuewith the latest pre-release, only one item is being shown in NavigationView Install-Package Microsoft.UI.Xaml -Version 2.4.0-prerelease.200203002 when within a Xaml Island.
- https://github.com/microsoft/PowerToys/tree/dev/settingsV2 is the branch
- https://github.com/microsoft/PowerToys/commit/d4c15c84c6d6a1ff40972cbe67cf481695b40ed2#diff-25d902c24283ab8cfbac54dfa101ad31 is the PR showing what we’re trying to do w/ a xaml island
- The WPF project is Microsoft.PowerToys.Settings.UI.Runner
- UWP control is Settings.UI, control is “dummyUserControl” for testing.
<muxc:NavigationView x:Name="nvSample">
<muxc:NavigationView.MenuItems>
<muxc:NavigationViewItem Icon="Play" Content="Menu Item1" Tag="SamplePage1" />
<muxc:NavigationViewItem Icon="Save" Content="Menu Item2" Tag="SamplePage2" />
<muxc:NavigationViewItem Icon="Refresh" Content="Menu Item3" Tag="SamplePage3" />
<muxc:NavigationViewItem Icon="Download" Content="Menu Item4" Tag="SamplePage4" />
</muxc:NavigationView.MenuItems>
<Frame x:Name="contentFrame"/>

Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (14 by maintainers)
Top Results From Across the Web
Problem with drag and drop in XamlHost:NavigationView
I have a WPF app that's using a XamlIsland to host a UWP NavigationView. On my development laptop, and on a Hyper-V VM...
Read more >How to cancel navigation on validation in UWP XAML ...
1 Answer. It's possible to stop navigation by using the property SelectsOnInvoked on the NavigationViewItem . Setting this to False will stop ...
Read more >Windows UI Library | XAML Brewer, by Diederik Krols
In this article we walk through a UWP app that demonstrates two new pagination controls that ship with the upcoming WinUI 2.6.
Read more >UWP ListView within a NavigationView, only first child ...
But for some reasons, when I try to use a ListView (or StackPanel ), only the first child is rendered. Some XAML reproducing...
Read more >XAML Islands v1 – Updates and Roadmap - Windows Blog
NET and native Win32 applications to host UWP XAML controls. ... NET app, this first version of XAML Islands only works on apps...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ranjeshj I actually worked around the bug by setting the following properties:
I noticed before setting them to these values that the broken animation would also display when the control is focused with TAB.
You can view and build the repro code from here
@Austin-Lamb @chrisglein This is an issue with the framework’s effective viewport event not getting raised in Xaml Islands scenario. We can work around it in NavigationView by devirtualizing the list for now, but this breaks virtualization in ItemsRepeater when used in a xaml island.
@ojhad as FYI to workaround for NavigationView.