async void Handle_Clicked(object sender, EventArgs e) { IPhotoPickerService photoPicker = App.Factory.Create(); Stream stream = await photoPicker.GetImageStreamAsync(); if (stream != null) { imgPhoto.Source = ImageSource.FromStream(() => stream); } }
internal async void OnChangeProfilePic() { Stream stream = await _photoPickerService.GetImageStreamAsync(); if (stream != null) { string message = await _userController.ChangeProfilePicture(User.Id, stream); if (string.IsNullOrEmpty(message)) { ProfilePic = ByteToImage(_constantUserInstance.GetProfilePic()); } } }
private void BrowsePicture() { _photoPickerService.GetImageStreamAsync(); }