Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
The comments for TargetIdiom are as follows:
// (Unused) Indicates that Forms is running on an unsupported device.
Unsupported = 0,
// Indicates that the width of the iPhone, iPod Touch, Windows Phone, or Android
// device on which Forms is running is narrower than 600 dips.
Phone = 1,
// Indicates that the width of the iPad, Windows 8.1, or Android device on which
// Forms is running is wider than 600 dips.
Tablet = 2,
// Indicates that Forms is running on a UWP app on Windows 10.
Desktop = 3
That suggests to me that UWP on any device will report Desktop, which is not the case in practice. The code and comments are out of synch. The comments need updating to match the reality for UWP.
Sorry, I should have made that clearer. For UWP on a non-desktop Windows 10 device, TargetIdiom does not report Desktop. The comments suggest it will.
Here's the code from Forms.cs that sets the Idiom for UWP. It seems that it will report Desktop, Phone and Tablet, so the comments show above on TargetIdiom do need to be updated to reflect this.
Device.Idiom = TargetIdiom.Desktop;
Device.Idiom = TargetIdiom.Phone;
Device.Idiom = TargetIdiom.Tablet;
Also, when/if they add MacOS support, the comment for Desktop needs to be edited.
I probably would have picked Computer instead of Desktop because we generally group Desktops and Laptops into the Computer category and laptops are not considered to be tablets.
The docs will need to be updated.
Should be resolved in 2.3.6-pre1. Thank you!