IamCalvinBrown.com a Blog Site

Code Examples, Consulting Advice and lots of other cool things

What device am I on? - Xamarin Forms


When a customer uses their tablet versus their phone, your app may appear less than stellar. Here's the code necessary to determine which device your app is running on and make changes to item sizes (ex: fonts, spacing, etc) to make your app appear made for all devices.

if ( Device.Idiom == TargetIdiom.Tablet)

{

        // perform all operations tablet related

}

Loading