Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How tu use the new Device.RuntimePlatform

$
0
0

Hello, could someone help me to understand how to use the new Device.RuntimePlatform with this kind of call :

statusLayout = new StackLayout
{
Padding = new Thickness(Device.OnPlatform(10,0,0), 0, 0, 0),
Spacing = 0,
BackgroundColor = Color.Black,
HorizontalOptions = LayoutOptions.Start,
VerticalOptions = LayoutOptions.Center,
Orientation = StackOrientation.Vertical
};

I would appreciate to avoid making a really big switch case everywhere I use that.

Thanks!

Phil


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>