private void FolderSettings_LayoutModeChangeRequested(object sender, EventArgs e) { if (ParentShellPageInstance.ContentPage != null) { var layoutType = FolderSettings.GetLayoutType(ParentShellPageInstance.FilesystemViewModel.WorkingDirectory); ParentShellPageInstance.ContentFrame.Navigate(layoutType, new NavigationArguments() { NavPathParam = ParentShellPageInstance.FilesystemViewModel.WorkingDirectory, AssociatedTabInstance = ParentShellPageInstance }, null); // Remove old layout from back stack ParentShellPageInstance.ContentFrame.BackStack.RemoveAt(ParentShellPageInstance.ContentFrame.BackStack.Count - 1); } }
private void FolderSettings_LayoutModeChangeRequested(object sender, EventArgs e) { if (ParentShellPageInstance.ContentPage != null) { var layoutType = FolderSettings.GetLayoutType(ParentShellPageInstance.FilesystemViewModel.WorkingDirectory); if (layoutType != ParentShellPageInstance.CurrentPageType) { ParentShellPageInstance.ContentFrame.Navigate(layoutType, new NavigationArguments() { NavPathParam = navigationArguments.NavPathParam, IsSearchResultPage = navigationArguments.IsSearchResultPage, SearchPathParam = navigationArguments.SearchPathParam, SearchResults = navigationArguments.SearchResults, IsLayoutSwitch = true, AssociatedTabInstance = ParentShellPageInstance }, null); // Remove old layout from back stack ParentShellPageInstance.ContentFrame.BackStack.RemoveAt(ParentShellPageInstance.ContentFrame.BackStack.Count - 1); } } }