parent
238c40172b
commit
cf6a7c681a
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.NewPage3"
|
||||||
|
Title="NewPage3">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<Label
|
||||||
|
Text="Welcome to .NET MAUI!"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<Button
|
||||||
|
Text="GoTo /NewPage4"
|
||||||
|
Clicked="GoToNewPage4WithSlash"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
<Button
|
||||||
|
Text="GoTo NewPage4"
|
||||||
|
Clicked="GoToNewPage4WithoutSlash"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,19 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class NewPage3 : ContentPage
|
||||||
|
{
|
||||||
|
public NewPage3()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToNewPage4WithSlash(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("/newpage4");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToNewPage4WithoutSlash(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("newpage4");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.NewPage4"
|
||||||
|
Title="NewPage4">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<Label
|
||||||
|
Text="Welcome to .NET MAUI!"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo /NewPage5"
|
||||||
|
Clicked="GoToNewPage5WithSlash"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
<Button
|
||||||
|
Text="GoTo NewPage5"
|
||||||
|
Clicked="GoToNewPage5WithoutSlash"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,19 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class NewPage4 : ContentPage
|
||||||
|
{
|
||||||
|
public NewPage4()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToNewPage5WithSlash(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("/newpage5");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToNewPage5WithoutSlash(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("newpage5");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.NewPage5"
|
||||||
|
Title="NewPage5">
|
||||||
|
<VerticalStackLayout>
|
||||||
|
<Label
|
||||||
|
Text="Welcome to .NET MAUI!"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo /NewPage4"
|
||||||
|
Clicked="GoToNewPage4WithSlash"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
<Button
|
||||||
|
Text="GoTo NewPage4"
|
||||||
|
Clicked="GoToNewPage4WithoutSlash"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,19 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class NewPage5 : ContentPage
|
||||||
|
{
|
||||||
|
public NewPage5()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToNewPage4WithSlash(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("/newpage4");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToNewPage4WithoutSlash(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("newpage4");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page1"
|
||||||
|
Title="Page1">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page1" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1_1"
|
||||||
|
Clicked="GoToPage1_1"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1/page1_2"
|
||||||
|
Clicked="GoToPage1_2"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
<Button
|
||||||
|
Text="GoTo /page1_3"
|
||||||
|
Clicked="GoToPage1_3"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,31 @@
|
|||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page1 : ContentPage
|
||||||
|
{
|
||||||
|
public Page1()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1_1");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_2(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1/page1_2");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_3(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("/page1_3");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page1_1"
|
||||||
|
Title="Page1_1">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page1_1" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,16 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page1_1 : ContentPage
|
||||||
|
{
|
||||||
|
public Page1_1()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page1_2"
|
||||||
|
Title="Page1_2">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page1_2" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1_2_1"
|
||||||
|
Clicked="GoToPage1_2_1"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1_3"
|
||||||
|
Clicked="GoToPage1_3"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="Go back then to page1_3"
|
||||||
|
Clicked="GoBackThenToPage1_3"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1_2"
|
||||||
|
Clicked="GoToPage1_2"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1/page1_1"
|
||||||
|
Clicked="GoToPage1_1"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo //page1/page1_2/page1_2_2"
|
||||||
|
Clicked="GoToPage1_2_2"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1/page1_2/page1_2_2"
|
||||||
|
Clicked="GoToPage1_2_2WithoutSlashes"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
Text="GoTo //page1"
|
||||||
|
Clicked="GoToPage1"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,56 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page1_2 : ContentPage
|
||||||
|
{
|
||||||
|
public Page1_2()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_2_1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1_2_1");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_3(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1_3");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoBackThenToPage1_3(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("../page1_3");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_2(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1_2");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1/page1_1");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_2_2(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("//page1/page1_2/page1_2_2");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_2_2WithoutSlashes(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1/page1_2/page1_2_2");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("//page1");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page1_2_1"
|
||||||
|
Title="Page1_2_1">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page1_2_1" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,14 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page1_2_1 : ContentPage
|
||||||
|
{
|
||||||
|
public Page1_2_1()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page1_2_2"
|
||||||
|
Title="Page1_2_2">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page1_2_2" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
<Button
|
||||||
|
Text="GoTo page1_2_1"
|
||||||
|
Clicked="GoToPage1_2_1"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
<Button
|
||||||
|
Text="Go back then To page1_2_3"
|
||||||
|
Clicked="GoBackThenToPage1_2_3"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
<Button
|
||||||
|
Text="Go Back"
|
||||||
|
Clicked="GoBack"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
<Button
|
||||||
|
Text="Go Back Twice then to page2"
|
||||||
|
Clicked="GoBackTwiceThenToPage2"
|
||||||
|
HorizontalOptions="Fill" />
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,34 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page1_2_2 : ContentPage
|
||||||
|
{
|
||||||
|
public Page1_2_2()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoToPage1_2_1(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("page1_2_1");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoBackThenToPage1_2_3(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("../page1_2_3");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoBack(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("..");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void GoBackTwiceThenToPage2(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
await Shell.Current.GoToAsync("../../page2");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page1_2_3"
|
||||||
|
Title="Page1_2_3">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page1_2_3" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,14 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page1_2_3 : ContentPage
|
||||||
|
{
|
||||||
|
public Page1_2_3()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page1_3"
|
||||||
|
Title="Page1_3">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page1_3" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,14 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page1_3 : ContentPage
|
||||||
|
{
|
||||||
|
public Page1_3()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="ex_ShellRoutes.Page2"
|
||||||
|
Title="Page2">
|
||||||
|
<ScrollView>
|
||||||
|
<VerticalStackLayout
|
||||||
|
Padding="30,0"
|
||||||
|
Spacing="25">
|
||||||
|
<Label
|
||||||
|
Text="Page2" Style="{StaticResource Headline}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center" />
|
||||||
|
<Label x:Name="labelNavStack"/>
|
||||||
|
</VerticalStackLayout>
|
||||||
|
</ScrollView>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,14 @@
|
|||||||
|
namespace ex_ShellRoutes;
|
||||||
|
|
||||||
|
public partial class Page2 : ContentPage
|
||||||
|
{
|
||||||
|
public Page2()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigatedToEventArgs args)
|
||||||
|
{
|
||||||
|
labelNavStack.Text = Shell.Current.Navigation.NavigationStack.Aggregate("Stack", (total, next) => $"{total} > {next?.Title ?? ""}");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue