Export (0) Print
Expand All

Running Windows Store apps in the simulator

Windows Store apps are full-screen and respond to user touch and hardware events like screen rotations. The Visual Studio simulator for Windows Store apps is a desktop application that simulates a Windows Store app. It enables a developer on a single machine to run applications and simulate common touch and rotation events. You can also choose the physical screen size and resolution that you want to emulate. Location co-ordinates of user input events in the simulator are translated to the co-ordinates of the select size and resolution.

Together with Visual Studio, the simulator provides an environment in which you can design, develop, debug, and test Windows Store apps. However, before you publish your app to the Windows Store, you should test your app on an actual device.

Caution note Caution

The Visual Studio simulator for Windows Store apps does not run in an isolated environment on your local machine. Therefore, errors that occur in the simulator, such as a non-recoverable system-wide error, can also affect the entire machine.

To run your Windows Store app in the simulator, select Simulator from the drop-down list next to the Start Debugging button on the debugger Standard toolbar.

Running in the Simulator

Hh441475.collapse_all(en-us,VS.110).gifMouse

Mouse mode button Mouse mode

Sets the interaction mode to mouse gestures. Mouse gestures include clicks, double-clicks, and drags.

Hh441475.collapse_all(en-us,VS.110).gifSingle finger touch

Start touch emulation button Start touch emulation

Sets the interaction mode to touch gestures of a single finger. Single-finger events include tapping, dragging, and swiping.

Simulator one finger target

The single target icon indicates the location of events in the simulator. Use the mouse to position the pointer.

One finger touch target

Press the left mouse button to activate the touch mode. For example, click the button to simulate a tap, or press and hold the button as you drag or swipe.

Hh441475.collapse_all(en-us,VS.110).gifPinch and Zoom

Pinch / zoom button Touch emulation pinch/zoom.

Sets the interaction mode to pinch and zoom gestures of two fingers.

Siimulator two finger target

The double target icon indicates the location of two fingers on the device screen.

  1. Move the mouse to position the icons over the object on the device screen.

  2. Rotate the mouse wheel backward or forward to change the simulated distance of the two fingers before you pinch or zoom.

Pinch, zoom, and rotate targets

  1. Press the left button and rotate the wheel backward (towards you) to zoom in (pinch).

  2. Press the left button and rotate the mouse wheel forward (away from you) to zoom out (zoom).

Hh441475.collapse_all(en-us,VS.110).gifObject rotation

Rotate object button Touch emulation rotate

Sets the interaction mode to rotation gestures of two fingers.

Siimulator two finger target

The double target icon indicates the location of two fingers on the device screen.

  • Move the mouse to position the icons over the object on the device screen.

  • Rotate the mouse wheel backward or forward to change the simulated orientaion of the two fingers before you rotate the object.

Pinch, zoom, and rotate targets

  • Press the left button and rotate the wheel backward (towards you) to rotate the object counter-clockwise. As you rotate the mouse wheel, one of the two target icons rotates around the other to indicate the relative size of the rotation.

  • Press the left button and rotate the mouse wheel forward (away from you) to rotate the object clockwise.

The following buttons generate single actions that are independent of the interaction mode.

Hh441475.collapse_all(en-us,VS.110).gifEnable or disable Always on top mode

You can set the simulator window to always be on top of other windows.

Toggle Topmost Window

Toggle Topmost Window

Enables or disables Always on top mode of the simulator window.

Hh441475.collapse_all(en-us,VS.110).gifChange the device orientation

You can switch the device orientation between portrait and landscape by rotating the simulator 90 degrees in any direction.

Note Note

The simulator does not respect DisplayProperties.AutoRotationPreferences property of a project. For example, if your project sets the orientation to Landscape, and you then rotate the simulator to a portrait orientation, the simulator display image will also be rotated and resized. Test these settings on an actual device.

Rotate right button

Rotate Simulator clockwise 90 degrees

Rotates the simulator clockwise by 90 degrees.

Rotate left button

Rotate Simulator counter-clockwise 90 degrees

Rotates the simulator counter-clockwise by 90 degrees.

Note Note

If you rotate the simulator so that one edge of the simulator is larger than the screen it is displayed on, the simulator is automatically resized to fit within the screen. The simulator is not resized to its original size if you rotate it again.

Hh441475.collapse_all(en-us,VS.110).gifChange the simulated screen size and resolution

To change the simulated screen size and resolution, choose the Change Resolution button on the palette and choose a new size and resolution from the list.

Change resolution list

The screen size and resolution are listed as Screen width inches, pixel width X pixel height. Note that both the screen size and the resolution are simulated. Location co-ordinates on the simulator are translated to the co-ordinates of the selected device size and resolution.

Note Note

You can save scaled versions of bitmap images in your app and Windows will load the correct image for the current scale. See Guidelines for scaling to pixel density. However, if you change the simulator resolution so that Windows picks a different image to fit the resolution, you have to stop and restart your debug session to view the new image.

Hh441475.collapse_all(en-us,VS.110).gifSet the simulated geo-location of the device

To test location-aware apps, use the Set Location dialog box.

  1. Simulator set location Choose the Set Location button.

    • If you need to fulfill requirements, the Set Location dialog box appears.

      Set location requirements dialog box

      Unfulfilled requirements in the list are marked with a red circle containing an 'X.'

      • If the requirement does not ask you to contact your system administrator, choose Configure to automatically correct the issue.

      • Otherwise, contact your system administrator to correct the issue.

    Simulator Set Location dialog box

  2. On the Set Location dialog box, set the Latitude and Longitude values in decimal degrees.

  3. Set the Altitude value to indicate the height of the position, specified in meters above or below the position. Use negative values to specify altitude that is below the position.

  4. Set the Error Radius value to indicate the accuracy level of the latitude and longitude coordinates, specified in meters.

Hh441475.collapse_all(en-us,VS.110).gifCapture a screenshot of your app for submission to the Windows Store

When you submit an app to the Windows Store, you must include screenshots of the app.

Note Note

The screenshot is saved at the current resolution of the simulator. To change the resolution, choose the Change Resolution button.

Simulator capture screen shot

To create screenshots of your app from the simulator, choose the Capture screenshot to clipboard button.

Screenshot settings

To set the location where screenshot are located, choose the Screenshot settings button and choose the location from the shortcut menu.

Screenshot settings context menu

Hh441475.collapse_all(en-us,VS.110).gifNavigate the simulator toolbar

  1. Press Ctrl+Alt+Up Arrow to switch focus from the simulator window to the simulator toolbar.

  2. Use the Up Arrow and the Down Arrow to move between toolbar buttons.

Hh441475.collapse_all(en-us,VS.110).gifShut down the simulator

Press Ctrl+Alt+F4.

Show:
© 2014 Microsoft