I use the WPF ExpanderView port ( ExpanderRT ) in my UWP application to display extensible headers with elements. This works great when the application launches for the first time and is initialized by MainPage . However, if you go to a new page and then return to MainPage , then ExpanderView will look advanced, but not display elements. It should look the same as when MainPage was first initialized. I displayed a GIF to show the behavior.
This is a XAML UserControl on MainPage ;
<ListView x:Name="CategoriesListView" ScrollViewer.VerticalScrollBarVisibility="Hidden"> <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListViewItem"> <ListViewItemPresenter ContentMargin="0" /> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListView.ItemContainerStyle> <ListView.ItemsPanel> <ItemsPanelTemplate> <StackPanel/> </ItemsPanelTemplate> </ListView.ItemsPanel> <ListView.ItemTemplate> <DataTemplate x:DataType="models:Category"> <expander:ExpanderControl x:Name="expander_Main" ItemsSource="{x:Bind childItems}" Expanded="Expanded" /> </DataTemplate> </ListView.ItemTemplate>
This is the EventHandler that I use for navigation;
private void OnSettingsButtonChecked(object sender, RoutedEventArgs e) { ShellSplitView.IsPaneOpen = false; ViewModel.NavigationService.Navigate(typeof(SettingsPage)); }
If any of you know why ExpanderView has such weird behavior, please give me a hint - I can provide more of my code if you need to.

[UPDATE]
I noticed that this behavior only occurs when the application is launched on a mobile device (Smartphone or Mobile Windows 10 Emulator). If I run the application on the local computer, ExpanderView working fine. When I use the back button to go to MainPage , it works as expected - I donβt know how to fix it, itβs really strange.

nor0x source share