Last active
April 15, 2020 00:04
-
-
Save dansiegel/6f0b1449b0aa6c6cbb1a5598d8c39c85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (var child in tabbedPage.Children) | |
{ | |
if (child.GetType() == selectedTabType) | |
{ | |
tabbedPage.CurrentPage = child; | |
break; | |
} | |
else if(child is NavigationPage navPage && | |
(navPage.CurrentPage == selectedTabType || navPage.RootPage == selectedTabType)) | |
{ | |
if(tabbedPage.Children.Where(x => x.GetType() == selectedTabType).Count() > 1) | |
throw new AmbiguousException(); | |
tabbedPage.CurrentPage = child; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment