/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="args">Details about the launch request and process.</param> protected override async void OnLaunched(LaunchActivatedEventArgs args) { if (!args.PrelaunchActivated) { await Startup.ActivateAsync(args); } CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar; // Hide default title bar. This setting persists and needs to be reset manually coreTitleBar.ExtendViewIntoTitleBar = true; ApplicationViewTitleBar titleBar = ApplicationView.GetForCurrentView().TitleBar; _themeListener = new ThemeListener(); _themeListener.ThemeChanged += SetCloseButtonBackgroundColorFromTheme; titleBar.ButtonBackgroundColor = Colors.Transparent; titleBar.ButtonInactiveBackgroundColor = Colors.Transparent; SetCloseButtonBackgroundColorFromTheme(_themeListener); }
protected override async void OnActivated(IActivatedEventArgs args) { await Startup.ActivateAsync(args); }