// private GridView GridWithPhoto; public MainPage () { InitializeComponent (); _mediaPicker = DependencyService.Get<IMediaPicker> (); _dataBaseService = DependencyService.Get<PhotoService> (); _savePhotoService = DependencyService.Get<ISavePhotoToSecretGallery> (); var list = _dataBaseService.GetThings (); var listSource = new List<ImageSource> (); foreach (var item in list) { AddImageView (item.Source); } // GridWithPhoto = new GridView () { // BackgroundColor = Color.Black, // ItemHeight = Device.OnPlatform (Width, Width, 0), // ItemWidth = Device.OnPlatform (Width, Width, 0), // RowSpacing = Device.OnPlatform (1, 1, 0), // ColumnSpacing = Device.OnPlatform (1, 1, 0), // HeightRequest = 200, // MinimumHeightRequest = 200, // WidthRequest = 200, // MinimumWidthRequest = 200 // }; // // GridWithPhoto.ItemTemplate = new DataTemplate (() => { // var cell = new ViewCell (); // var view = new Image (); // view.BackgroundColor = Color.Blue; // // view.SetBinding (Image.SourceProperty, "Source"); // cell.View = view; // return cell; // }); // // GridWithPhoto.ItemsSource = list; // mainStack.Children.Add (GridWithPhoto); takePhoto.Clicked += TakePhotoClicked; selectPhoto.Clicked += SelectPhotoClicked; }