question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest prerelease hitting an issue with only the first item being shown in NavigationView (Xaml Island scenario)

See original GitHub issue

with 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.

<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"/>

winui bug

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeblevinscommented, Mar 24, 2020

@ranjeshj I actually worked around the bug by setting the following properties:

SelectionFollowsFocus="Enabled"
AllowFocusOnInteraction="False"

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

1reaction
ranjeshjcommented, Mar 12, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found