// Displays a view in the specified view mode
        public async Task <ViewLifetimeControl> TryShowAsViewModeAsync(string windowTitle, Type pageType, ApplicationViewMode viewMode = ApplicationViewMode.Default)
        {
            ViewLifetimeControl viewControl = await CreateViewLifetimeControlAsync(windowTitle, pageType);

            SecondaryViews.Add(viewControl);
            viewControl.StartViewInUse();
            await ApplicationViewSwitcher.TryShowAsViewModeAsync(viewControl.Id, viewMode);

            viewControl.StopViewInUse();
            return(viewControl);
        }
        // Displays a view as a standalone
        // You can use the resulting ViewLifeTimeControl to interact with the new window.
        public async Task <ViewLifetimeControl> TryShowAsStandaloneAsync(string windowTitle, Type pageType)
        {
            ViewLifetimeControl viewControl = await CreateViewLifetimeControlAsync(windowTitle, pageType);

            SecondaryViews.Add(viewControl);
            viewControl.StartViewInUse();
            await ApplicationViewSwitcher.TryShowAsStandaloneAsync(viewControl.Id, ViewSizePreference.Default, ApplicationView.GetForCurrentView().Id, ViewSizePreference.Custom);

            //await ApplicationViewSwitcher.TryShowAsStandaloneAsync(viewControl.Id, ViewSizePreference.Custom);
            //viewControl.StopViewInUse();

            await viewControl.Dispatcher.RunAsync(CoreDispatcherPriority.High, () =>
            {
                bool success = viewControl.ResizeView();
            });

            viewControl.StopViewInUse();

            return(viewControl);
        }