I have the following C# code:
var footer = new StackLayout() { BackgroundColor = Device.OnPlatform(Color.FromRgb(225, 240, 251), Color.FromRgb(22
Newer version syntax of OnPlatform is slightly different
In Xaml:
#0000FF #FF0000
In code:
switch (Device.RuntimePlatform) { case "iOS": break; case "Android": break; case "UWP": break; default: break; }