26. Juli 2010

Windows Phone 7 Devicetype

von Andreas Bruckner | Abgelegt in .NET Framework, Windows 7 Phone

How to find out, if your app is running in an emulator, or on a real device?

In July’s beta, Microsoft has moved this property from System.Environment to Microsoft.Devices.Environment namespace.

//enum DeviceType contains: Device, Emulator
this.IsEmulator = (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator);

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google
  • description
  • description
  • TwitThis
Dieser Text wird durch den Flashinhalt ersetzt.

Kommentar hinzufügen