Ejemplo n.º 1
0
 public void LoadFromStream(System.IO.Stream stream)
 {
     this.Source = FileImageSource.FromStream(() =>
     {
         return(stream);
     });
 }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var photo = (byte[])value;

            if (photo != null)
            {
                return(FileImageSource.FromStream(() => {
                    return new MemoryStream(photo);
                }));
            }
            else
            {
                //return null;
                return("add_pic.png");
            }
        }
 public static void SetImage(this Button btn, Stream img)
 {
     btn.Image = FileImageSource.FromStream(() => { return(img); }).ToFileImageSource();
 }