diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CoreGalleryBasePage.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CoreGalleryBasePage.cs index 4631dcd9e64a..b8f0972bffa5 100644 --- a/src/Controls/tests/TestCases.HostApp/CoreViews/CoreGalleryBasePage.cs +++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CoreGalleryBasePage.cs @@ -48,10 +48,10 @@ internal CoreGalleryBasePage() new Button() { Text = "Dismiss Page", - Command = new Command(async () => + Command = new Command(() => { if (_picker.SelectedIndex == 0) - await Navigation.PopAsync(); + Application.Current.Quit(); else _picker.SelectedIndex--; }) diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs index 81c73b5107c6..c321b5822da9 100644 --- a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs +++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs @@ -123,7 +123,7 @@ public CorePageView(Page rootPage) ItemTemplate = template; ItemsSource = _pages; - ItemSelected += async (sender, args) => + ItemSelected += (sender, args) => { if (SelectedItem == null) { @@ -134,14 +134,8 @@ public CorePageView(Page rootPage) if (item is GalleryPageFactory page) { var realize = page.Realize(); - if (realize is Shell) - { - Application.Current.MainPage = realize; - } - else - { - await PushPage(realize); - } + + Application.Current.MainPage = realize; } SelectedItem = null;