private async void BtnConfirm_Clicked(object sender, EventArgs e)
        {
            await Navigation.PushPopupAsync(new HarbiSahaApp.AnimationPages.AnimationPopUpPage1_Waiting("Yükleniyor.."));

            imgStream = mainFile.GetStream();

            string userPhotoName = currentUser.Id.ToString() + "_pp";
            var    content       = new MultipartFormDataContent();

            content.Add(new StreamContent(mainFile.GetStream()), "FileName", mainFile.Path);
            //content.Add(new ImageSo)
            string message = await service.ChangeProfilePhoto(content, currentUser.Id);

            User toBeReturned = await service.GetSingleUser(currentUser.Id);

            currentUser.PhotoPath = toBeReturned.PhotoPath;
            App.Current.Properties["loggedUser"] = currentUser;
            await Navigation.PopPopupAsync();

            if (message == "Başarılı")
            {
                await DisplayAlert("Başarılı", "Profil fotoğrafınız gücellendi!", "Tamam");

                mainFile.Dispose();
            }
        }
 public PagePrincipal(Plugin.Media.Abstractions.MediaFile Foto)
 {
     InitializeComponent();
     MinhaImagem.Source = ImageSource.FromStream(() =>
     {
         var stream = Foto.GetStream();
         Foto.Dispose();
         return(stream);
     });
     //testeDB.Text = App.DbPath;
     Detail = new PageHome();
     bt_home_Clicked(new object(), new EventArgs());
 }