I'm using Template 10 for the MVVM and the Hamburger menu in my UWP application. Normally from page to page navigation takes 2 to 3 secs. When App is in the background for more than 5 hours, then come back to the foreground, and page navigation takes 8 sec. How can I reduce the delay from page to page navigation?
XAML code for Menu Item:
```<Controls:HamburgerButtonInfo ClearHistory="True" x:Name="manifest" Selected="manifest_Selected" Unselected="manifest_Unselected" PageType="views:Manifest">
<StackPanel Orientation="Horizontal">
<BitmapIcon Width="30" Height="30" x:Name="manifesticon" Margin="10,20,0,0" UriSource="ms-appx:///Assets/ic_menu_manifest.png"/>
<TextBlock Margin="16,20,0,0" x:Name="manifesttext"
VerticalAlignment="Center"
Text="Manifest" />
</StackPanel>
</Controls:HamburgerButtonInfo>```
CS code:
public void manifest_Selected(object sender, RoutedEventArgs e)
{
reportElement = new HamburgerButtonInfo();
manifesticon.Foreground = (Brush)Application.Current.Resources["HeaderBackground"];
manifesttext.Foreground = (Brush)Application.Current.Resources["HeaderBackground"];
reportElement = manifest;
if (report.IsEnabled)
{
report_Unselected(sender, e);
}
}
public void manifest_Unselected(object sender, RoutedEventArgs e)
{
manifesticon.Foreground = new SolidColorBrush(Color.FromArgb(255, 229, 229, 229));
manifesttext.Foreground = new SolidColorBrush(Color.FromArgb(255, 229, 229, 229));
}