[Testing] Navigate directly to control tests (#25242)
* Like with issues, set gallery items as mainpage directly * More changes
This commit is contained in:
Родитель
67b00cbf5a
Коммит
4028fc14ec
|
@ -48,10 +48,10 @@ namespace Maui.Controls.Sample
|
|||
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--;
|
||||
})
|
||||
|
|
|
@ -123,7 +123,7 @@ namespace Maui.Controls.Sample
|
|||
ItemTemplate = template;
|
||||
ItemsSource = _pages;
|
||||
|
||||
ItemSelected += async (sender, args) =>
|
||||
ItemSelected += (sender, args) =>
|
||||
{
|
||||
if (SelectedItem == null)
|
||||
{
|
||||
|
@ -134,14 +134,8 @@ namespace Maui.Controls.Sample
|
|||
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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче