Add Navigation between Pages

pull/25/head
Louis LABORIE 2 years ago
parent bfaff7bcab
commit 1a063d10f5

@ -5,6 +5,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Linaris"
Shell.FlyoutBehavior="Flyout"
Shell.NavBarIsVisible="False"
FlyoutWidth="200">
<FlyoutItem Title="Home" Icon="home.png">

@ -4,9 +4,9 @@
x:Class="Linaris.Layout">
<VerticalStackLayout BackgroundColor="black" Spacing="20" Padding="0,20,0,0">
<Button Text="Home" Style="{StaticResource buttons}"/>
<Button Text="Playlists" Style="{StaticResource buttons}"/>
<Button Text="Files" Style="{StaticResource buttons}"/>
<Button Text="Home" Style="{StaticResource buttons}" Clicked="Go_Home"/>
<Button Text="Playlists" Style="{StaticResource buttons}" Clicked="Go_Playlists"/>
<Button Text="Files" Style="{StaticResource buttons}" Clicked="Go_Files"/>
</VerticalStackLayout>
</ContentView>

@ -6,4 +6,24 @@ public partial class Layout : ContentView
{
InitializeComponent();
}
private async void Go_Home(object sender, EventArgs e)
{
await Navigation.PushAsync(new MainPage());
}
private async void Go_Playlists(object sender, EventArgs e)
{
await Navigation.PushAsync(new PlaylistsPage());
}
private async void Go_Back(object sender, EventArgs e)
{
await Navigation.PopAsync();
}
private async void Go_Files(object sender, EventArgs e)
{
await Navigation.PushAsync(new LocalFilesPage());
}
}
Loading…
Cancel
Save