When you are developing your Windows Phone 7 application you might want to know if you are running on an emulator or on the device. Fortunately there’s a property for that:
It can have the values:
So a simple check of:
if(Microsoft.Devices.Environment.DeviceType == Microsoft.Devices.DeviceType.Device)
MessageBox.Show(“On the emulator”);
will let you know that you are on the emulator.