Advertisement
Guest User

Untitled

a guest
Aug 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. protected async Task PickImage()
  2. {
  3. try
  4. {
  5. Stream stream = await DependencyService.Get<IPicturePicker>().GetImageStreamAsync();
  6. //stream.GetType<Uri>();
  7. if (stream != null)
  8. {
  9. Image image = new Image
  10. {
  11. Source = ImageSource.FromStream(() => stream),
  12. BackgroundColor = Color.Gray
  13. };
  14.  
  15. cadastrar_foto_perfil.Source = ImageSource.FromStream(() => stream);
  16.  
  17. }
  18.  
  19. if (Device.OS == TargetPlatform.iOS)
  20. {
  21. loginPage.RecriaCadastroIOS();
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement