in AppInstallerFileBuilder/AppInstallerFileBuilder/App.xaml.cs [78:136]
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
// Change minimum window size
ApplicationView.GetForCurrentView().SetPreferredMinSize(new Size(320, 200));
// Darken the window title bar using a color value to match app theme
ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar;
if (titleBar != null)
{
Color titleBarColor = (Color)App.Current.Resources["SystemChromeMediumColor"];
titleBar.BackgroundColor = titleBarColor;
titleBar.ButtonBackgroundColor = titleBarColor;
}
//if (SystemInformationHelpers.IsTenFootExperience)
//{
// // Apply guidance from https://msdn.microsoft.com/windows/uwp/input-and-devices/designing-for-tv
// ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
// this.Resources.MergedDictionaries.Add(new ResourceDictionary
// {
// Source = new Uri("ms-appx:///Styles/TenFootStylesheet.xaml")
// });
//}
AppShell shell = Window.Current.Content as AppShell;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (shell == null)
{
// Create a AppShell to act as the navigation context and navigate to the first page
shell = new AppShell();
// Set the default language
shell.Language = Windows.Globalization.ApplicationLanguages.Languages[0];
shell.AppFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
}
// Place our app shell in the current Window
Window.Current.Content = shell;
if (shell.AppFrame.Content == null)
{
// When the navigation stack isn't restored, navigate to the first page
// suppressing the initial entrance animation.
shell.AppFrame.Navigate(typeof(MainPackageView), e.Arguments, new Windows.UI.Xaml.Media.Animation.SuppressNavigationTransitionInfo());
}
// Ensure the current window is active
Window.Current.Activate();
}