protected override void OnActivated(IActivatedEventArgs args) { if (args.Kind == ActivationKind.PrintTaskSettings) { Frame rootFrame = new Frame(); if (null == Window.Current.Content) { rootFrame.Navigate(typeof(MainPage)); Window.Current.Content = rootFrame; } Window.Current.Activate(); MainPage mainPage = (MainPage)rootFrame.Content; // Load advanced printer preferences scenario mainPage.LoadAdvancedPrintSettingsContext((PrintTaskSettingsActivatedEventArgs)args); } }