Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

i have a button and an image view when i take image form gallery how can i save it ?

$
0
0

async void Button_Clicked(object sender, EventArgs e)
{
await CrossMedia.Current.Initialize();
if (!CrossMedia.Current.IsPickPhotoSupported)
{
await DisplayAlert("error", "errore", "ok");
return;
}
var mediaoption = new PickMediaOptions()
{
PhotoSize = PhotoSize.Medium
};
var selectedimagefile = await CrossMedia.Current.PickPhotoAsync(mediaoption);
if (selectedimagefile == null)
{
await DisplayAlert("error", "try agisn", "ok");
return;
}
Selectedimage.Source = ImageSource.FromStream(()=> selectedimagefile.GetStream())
}


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>