diff options
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs')
-rw-r--r-- | Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs index 62ec6940..1071505c 100644 --- a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs +++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellListPage.cs @@ -21,11 +21,8 @@ namespace Xamarin.Forms.Controls { Title = "ImageCell List Gallery - Legacy"; - Device.OnPlatform (iOS: () => { - if (Device.Idiom == TargetIdiom.Tablet) { - Padding = new Thickness (0, 0, 0, 60); - } - }); + if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet) + Padding = new Thickness(0, 0, 0, 60); var dataTemplate = new DataTemplate (typeof (ImageCell)); var stringToImageSourceConverter = new GenericValueConverter ( @@ -73,11 +70,8 @@ namespace Xamarin.Forms.Controls { public UrlImageCellListPage() { - Device.OnPlatform (iOS: () => { - if (Device.Idiom == TargetIdiom.Tablet) { - Padding = new Thickness (0, 0, 0, 60); - } - }); + if (Device.RuntimePlatform == Device.iOS && Device.Idiom == TargetIdiom.Tablet) + Padding = new Thickness(0, 0, 0, 60); var dataTemplate = new DataTemplate (typeof (ImageCell)); var stringToImageSourceConverter = new GenericValueConverter ( |