Device.OnPlatform deprecated : <p>Inside the constructor of my <code>ContentPage</code> I try to set a platform dependent padding value:</p>

<pre><code>Padding = new Thickness(5, Device.OnPlatform(20, 5, 5), 5, 5);
</code></pre>

<p>Visual Studio underlines <code>Device.OnPlatform</code> and when I hover the mouse pointer over the method call I get the following warning:</p>

<blockquote>
  <p>Devide.OnPlatform(T, T, T) is obsolete: 'Use
  switch(RuntimePlatform) instead'.</p>
</blockquote>

<p>The code initially used is from the <a href="https://developer.xamarin.com/guides/xamarin-forms/creating-mobile-apps-xamarin-forms/" rel="noreferrer"><strong>e-book</strong></a> 'Creating Mobile Apps with Xamarin.Forms Book' published in 2016. I 'm really surprised how fast this platform evolves! </p>

<p>Unfortunately I'm not aware of how <code>Device.OnPlatform</code> should be replaced using the way suggested by the warning. </p>
