title: ExpanderView is expanded after page navigation
body: <p>I'm using a port of the <code>WPF</code> <code>ExpanderView</code> (<a href="https://expanderview.codeplex.com/" rel="nofollow noreferrer">ExpanderRT</a>) in my <code>UWP</code> app to show expandable headers with items. This works fine when the app is launched for the first time and <code>MainPage</code> is initialized. However if I navigate to a new page and then go back to <code>MainPage</code> the <code>ExpanderView</code> looks like expanded, but not it's not showing the items. It should look the same as it was when <code>MainPage</code> was first initialized. I captured a <code>GIF</code> to show the behaviour.</p>
  
  <p>This is the <code>XAML</code> of the <code>UserControl</code> on the <code>MainPage</code>;</p>
  
  <pre><code>&lt;ListView x:Name="CategoriesListView" ScrollViewer.VerticalScrollBarVisibility="Hidden"&gt;
  &lt;ListView.ItemContainerStyle&gt;
      &lt;Style TargetType="ListViewItem"&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="ListViewItem"&gt;
                      &lt;ListViewItemPresenter ContentMargin="0" /&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/ListView.ItemContainerStyle&gt;
  &lt;ListView.ItemsPanel&gt;
      &lt;ItemsPanelTemplate&gt;
          &lt;StackPanel/&gt;
      &lt;/ItemsPanelTemplate&gt;
  &lt;/ListView.ItemsPanel&gt;
  &lt;ListView.ItemTemplate&gt;
      &lt;DataTemplate x:DataType="models:Category"&gt;
          &lt;expander:ExpanderControl
              x:Name="expander_Main"
              ItemsSource="{x:Bind childItems}"
              Expanded="Expanded" /&gt;
      &lt;/DataTemplate&gt;
  &lt;/ListView.ItemTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is the <code>EventHandler</code> which I use for navigation;</p>
  
  <pre><code>    private void OnSettingsButtonChecked(object sender, RoutedEventArgs e)
      {
          ShellSplitView.IsPaneOpen = false;
          ViewModel.NavigationService.Navigate(typeof(SettingsPage));
      }
  </code></pre>
  
  <p>If anyone of you knows why the <code>ExpanderView</code> has such a weird behavior, please give me a hint - I can provide more of my code if you need.</p>
  
  <p><a href="https://i.stack.imgur.com/tRNYf.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tRNYf.gif" alt="Capture"></a></p>
  
  <p><strong>[UPDATE]</strong></p>
  
  <p>I noticed that this behavior only occurs, when I run the app on a mobile device (Smartphone or Mobile Windows 10 Emulator). If I execute the app on the local machine the <code>ExpanderView</code> works fine. When I use the back button for navigating back to <code>MainPage</code> it works as expected - I don't have a clue how to fix this, it's really weird.</p>
  
  <p><a href="https://i.stack.imgur.com/VmQzM.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VmQzM.gif" alt="Capture on Desktop"></a></p>