/// <summary> /// MainPage consists of two views - skill info (displays details about skill) and skill app (main skill execution) /// </summary> public MainPage() { // Launch UWP app in maximized mode to show Super Resolution output in full resolution var currentView = Windows.Graphics.Display.DisplayInformation.GetForCurrentView(); var screenResolution = new Size(currentView.ScreenWidthInRawPixels, currentView.ScreenHeightInRawPixels); var displayScaling = currentView.ResolutionScale == Windows.Graphics.Display.ResolutionScale.Invalid ? 1 : currentView.RawPixelsPerViewPixel; var preferredWindowRes = new Size(screenResolution.Width / displayScaling, screenResolution.Height / displayScaling); Windows.UI.ViewManagement.ApplicationView.PreferredLaunchViewSize = new Size(preferredWindowRes.Width, preferredWindowRes.Height); Windows.UI.ViewManagement.ApplicationView.PreferredLaunchWindowingMode = Windows.UI.ViewManagement.ApplicationViewWindowingMode.PreferredLaunchViewSize; this.InitializeComponent(); // Instantiate parent skill class m_psSkill = new SuperResolutionSkillObj(); // Set default view to SkillAppPage NavigateToView("SRSkillAppPage"); }
protected override void OnNavigatedTo(NavigationEventArgs e) { m_paramsSkillObj = (SuperResolutionSkillObj)e.Parameter; base.OnNavigatedTo(e); }