Bug 31640 - Device.OS returns value as Windows in 'Windows Phone Emulator' instead of WinPhone
Summary: Device.OS returns value as Windows in 'Windows Phone Emulator' instead of Win...
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 1.4.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-07-04 07:38 UTC by Subha
Modified: 2016-04-11 03:05 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Project detects current device platform and post it in home screen (6.10 MB, application/zip)
2015-07-04 07:38 UTC, Subha

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Subha 2015-07-04 07:38:40 UTC
Created attachment 11860 [details]
Project detects current device platform and post it in home screen

I am developing for Windows Phone in Visual Studio 2013 Premium 4.5 using Xamarin.Forms 1.4.2. In some places for platform specific feature I am using conditional statements as below:

if (Device.OS == TargetPlatform.Android)
        //Similarly for iOS & WinPhone

If I run my project in Android or iOS emulator, corresponding platforms are detected properly, but when I run my project in Windows Phone emulator, instead of WinPhone it gives target platform as Windows.

In below attached project it return other. 

Why so? Is it bug?
Comment 1 Chris King 2015-07-08 19:48:23 UTC
I cannot reproduce this locally. What windows phone are you using?
Comment 2 Subha 2015-07-08 23:36:26 UTC
Thanks for the response. I got clarity from below thread. Sorry, its not a bug.


Device.OnPlatform, doesn't have Windows property. I am developing for Windows Phone 8.1 (Runtime). Does Xamarin has any plan to add it in future?
Comment 3 Jason Smith [MSFT] 2016-04-11 03:05:22 UTC
WinRT/UAP all return as Windows.