From b6cb64e4930de9b16309f2d30c6bb0a2177048fd Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Thu, 12 Jan 2017 21:05:41 +0100 Subject: [C] new OnPlatform mechanism (#658) * [C] Obsolete TargetPlatform * [Xaml] support and test the new syntax * blind fix windows platforms --- Xamarin.Forms.Controls/GalleryPages/StackLayoutGallery.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Xamarin.Forms.Controls/GalleryPages/StackLayoutGallery.cs') diff --git a/Xamarin.Forms.Controls/GalleryPages/StackLayoutGallery.cs b/Xamarin.Forms.Controls/GalleryPages/StackLayoutGallery.cs index b08b5f35..7a985653 100644 --- a/Xamarin.Forms.Controls/GalleryPages/StackLayoutGallery.cs +++ b/Xamarin.Forms.Controls/GalleryPages/StackLayoutGallery.cs @@ -10,11 +10,8 @@ namespace Xamarin.Forms.Controls { public StackLayoutGallery () { - 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 stack = new StackLayout { Orientation = StackOrientation.Vertical }; Button b1 = new Button { Text = "Boring", HeightRequest = 500, MinimumHeightRequest = 50 }; -- cgit v1.2.3