You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShopNCook/Views/MorePage.xaml.cs

37 lines
1.0 KiB

namespace ShoopNCook.Pages;
public partial class MorePage : ContentPage
{
public MorePage(): this("Adom Shafi", ImageSource.FromFile("default_profile_picture.png"))
{
}
public MorePage(string userName, ImageSource userImage)
{
InitializeComponent();
ProfileImage.Source = userImage;
ProfileName.Text = userName;
}
private async void OnMyRecipesButtonTapped(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new MyRecipesPage());
}
private async void OnEditProfileButtonTapped(object sender, EventArgs e)
{
await Shell.Current.Navigation.PushAsync(new ProfilePage());
}
private async void OnLogoutButtonTapped(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//Login");
}
private async void OnShareButtonClicked(object sender, EventArgs e)
{
await Share.RequestAsync(new ShareTextRequest
{
Text = "Voici le texte à partager (à changer)",
Title = "Partagez ce texte : (à modifier)"
});
}
}