Ajout de la navigation par route pour Detail_Animal

pull/18/head
Leana BESSON 2 years ago
parent e4fd7fca34
commit 810aa0579e

@ -21,7 +21,7 @@ public partial class Animaux : ContentPage
public async void Button_OnClick(object sender, EventArgs e)
{
(App.Current as App).AnimalSelectionner = (App.Current as App).Theque.AjouterAnimal();
await Shell.Current.GoToAsync("//DetailAnimal");
await Shell.Current.GoToAsync("///DetailAnimal");
}
}

@ -5,7 +5,7 @@
Title="{Binding Nom}" x:Name="page_creation">
<ScrollView>
<VerticalStackLayout>
<VerticalStackLayout
<HorizontalStackLayout
VerticalOptions="Start"
HorizontalOptions="End">
<Button Text="Valider"
@ -16,7 +16,7 @@
Background="{StaticResource Primary}"
Margin="20"
Clicked="Button_OnClick"/>
</VerticalStackLayout>
</HorizontalStackLayout>
<Image Source="{Binding Image}"
MaximumWidthRequest="300"
Margin="20"

@ -14,14 +14,14 @@ public partial class DetailAnimal : ContentPage
public async void Button_OnClick(object sender, EventArgs e)
{
(App.Current as App).Theque.SupprimerAnimal((App.Current as App).AnimalSelectionner);
await Shell.Current.GoToAsync("//Animal");
await Shell.Current.GoToAsync("//Animaux");
}
public async void Validate_OnClick(object sender, EventArgs e)
{
if ((App.Current as App).AnimalSelectionner.NomIsValid == true)
{
await Shell.Current.GoToAsync("//Animal");
await Shell.Current.GoToAsync("//Animaux");
}
}

Loading…
Cancel
Save