You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/debugger/run-windows-store-apps-in-the-simulator.md
+49-39Lines changed: 49 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -15,58 +15,65 @@ ms.workload:
15
15
- "uwp"
16
16
---
17
17
# Run UWP apps in the simulator
18
+
18
19
The Visual Studio simulator for UWP apps is a desktop application that simulates a UWP app. Typically, you will want to debug on the local machine, a connected device, or a remote machine. However, in some scenarios, you may want to use the Visual Studio simulator to emulate a different physical screen size and resolution. You can also simulate common touch and rotation events and simulate network connection properties.
19
20
20
-
The simulator provides an environment in which you can design, develop, debug, and test UWP apps. However, before you publish your app to Microsoft Store, you should test your app on an actual device.
21
+
The simulator provides an environment in which you can design, develop, debug, and test UWP apps. However, before you publish your app to Microsoft Store, you should test your app on an actual device.
21
22
22
-
The Visual Studio simulator for UWP 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.
23
+
The Visual Studio simulator for UWP 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.
23
24
24
25
> [!IMPORTANT]
25
-
> The Visual Studio 2015 simulator does not include the geolocation button. This is because the Windows 10 simulator does not include geolocation simulation.
26
+
> The Visual Studio 2015 simulator does not include the geolocation button. This is because the Windows 10 simulator does not include geolocation simulation.
26
27
27
28
## <aname="BKMK_Set_the_simulator_as_the_target"></a> Set the simulator as the target
28
-
To run your UWP app in the simulator, select **Simulator** from the drop-down list next to the **Start Debugging** button on the debugger **Standard** toolbar. This option is only available if your app's **Target Platform Min. Version** is less than or equal to the operating system on your development machine.
29
29
30
-

30
+
To run your UWP app in the simulator, select **Simulator** from the drop-down list next to the **Start Debugging** button on the debugger **Standard** toolbar. This option is only available if your app's **Target Platform Min. Version** is less than or equal to the operating system on your development machine.
31
+
32
+

31
33
32
34
## <aname="BKMK_Choose_an_interaction_mode"></a> Choose an interaction mode
33
-
You can choose the following interaction modes
35
+
36
+
You can choose the following interaction modes:
34
37
35
38
- Mouse mode: sets the interaction mode to mouse gestures. Mouse gestures include clicks, double-clicks, and drags.
36
39
37
40
- Start touch emulation: sets the interaction mode to touch gestures of a single finger. Single-finger events include tapping, dragging, and swiping.
38
41
39
-
 The single target icon indicates the location of events in the simulator. Use the mouse to position the pointer.
42
+

43
+
44
+
The single target icon indicates the location of events in the simulator. Use the mouse to position the pointer.
40
45
41
-
 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.
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.
42
49
43
50
## Pinch and Zoom
44
-
Sets the interaction mode to pinch and zoom gestures of two fingers.
45
51
46
-
-
52
+
Sets the interaction mode to pinch and zoom gestures of two fingers.
47
53
48
-
- The double target icon indicates the location of two fingers on the device screen.
54
+

49
55
50
-
- Move the mouse to position the icons over the object on the device screen.
56
+
The double target icon indicates the location of two fingers on the device screen.
57
+
58
+
- Move the mouse to position the icons over the object on the device screen.
51
59
52
-
- Rotate the mouse wheel backward or forward to change the simulated distance of the two fingers before you pinch or zoom.
60
+
- Rotate the mouse wheel backward or forward to change the simulated distance of the two fingers before you pinch or zoom.
53
61
54
-
-
62
+

55
63
56
-
- Press the left button and rotate the wheel backward (towards you) to zoom in (pinch).
64
+
- Press the left button and rotate the wheel backward (towards you) to zoom in (pinch).
57
65
58
-
- Press the left button and rotate the mouse wheel forward (away from you) to zoom out (zoom).
66
+
- Press the left button and rotate the mouse wheel forward (away from you) to zoom out (zoom).
59
67
60
68
## Object rotation
61
-
The **Touch emulation rotate** button sets the interaction mode to rotation gestures using two fingers.
62
69
63
-
- Move the mouse to position the icons over the object on the device screen.
70
+
The **Touch emulation rotate** button sets the interaction mode to rotation gestures using two fingers.
64
71
65
-
- Rotate the mouse wheel backward or forward to change the simulated orientation of the two fingers before you rotate the object.
72
+
- 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 orientation of the two fingers before you rotate the object.
66
73
67
74
- 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.
68
75
69
-
- Press the left button and rotate the mouse wheel forward (away from you) to rotate the object clockwise.
76
+
- Press the left button and rotate the mouse wheel forward (away from you) to rotate the object clockwise.
70
77
71
78
## <aname="BKMK_Enable_or_disable_Always_on_top_mode"></a> Enable or disable Always on top mode
72
79
You can set the simulator window to always be on top of other windows. The **Toggle Topmost Window** button enables or disables the **Always on top** mode of the simulator window.
@@ -75,37 +82,38 @@ The Visual Studio simulator for UWP apps is a desktop application that simulates
75
82
You can switch the device orientation between portrait and landscape by rotating the simulator 90 degrees in any direction.
76
83
77
84
> [!NOTE]
78
-
> The simulator does not respect [DisplayProperties.AutoRotationPreferences](http://go.microsoft.com/fwlink/?LinkId=249460) 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.
85
+
> The simulator does not respect [DisplayProperties.AutoRotationPreferences](http://go.microsoft.com/fwlink/?LinkId=249460) 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.
79
86
80
87
> [!NOTE]
81
-
> 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.
88
+
> 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.
82
89
83
90
## <aname="BKMK_Change_the_simulated_screen_size_and_resolution"></a> Change the simulated screen size and resolution
84
91
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.
85
92
86
93
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.
87
94
88
95
> [!NOTE]
89
-
> You can save scaled versions of bitmap images in your app and Windows will load the correct image for the current scale. For more information, see [Design and UI intro](/windows/uwp/layout/design-and-ui-intro). 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.
96
+
> You can save scaled versions of bitmap images in your app and Windows will load the correct image for the current scale. For more information, see [Design and UI intro](/windows/uwp/layout/design-and-ui-intro). 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.
90
97
91
98
## <aname="BKMK_Capture_a_screenshot_of_your_app_for_submission_to_the_Microsoft_Store"></a> Capture a screenshot of your app for submission to Microsoft Store
92
99
When you submit an app to Microsoft Store, you must include screenshots of the app.
93
100
94
101
> [!NOTE]
95
-
> The screenshot is saved at the current resolution of the simulator. To change the resolution, choose the **Change Resolution** button.
102
+
> The screenshot is saved at the current resolution of the simulator. To change the resolution, choose the **Change Resolution** button.
96
103
97
104
- To create screenshots of your app from the simulator, choose the **Capture screenshot to clipboard** button.
98
105
99
106
- To set the location where screenshots are located, choose the **Screenshot settings** button and choose the location from the shortcut menu.
You can help your app's users manage the cost of metered network connections by maintaining awareness of network connection cost or data plan status changes and enabling your app to use this information to avoid incurring additional costs for roaming or exceeding a specified data transfer limit. The [Windows.Networking.Connectivity](/uwp/api/windows.networking.connectivity) APIs lets you respond to [NetworkStatusChanged](/uwp/api/windows.networking.connectivity.networkinformation) and [TriggerType](/uwp/api/windows.applicationmodel.background.systemtrigger) events that sign. See [Quickstart: Managing metered network cost constraints](https://msdn.microsoft.com/library/windows/apps/Hh750310.aspx).
105
111
106
-
To debug or test your network cost-aware code, the simulator can mimic properties of a network that are exposed through the [ConnectionProfile](/uwp/api/windows.networking.connectivity.connectionprofile) object returned by [GetInternetConnectionProfile](/uwp/api/windows.networking.connectivity.networkinformation).
112
+
You can help your app's users manage the cost of metered network connections by maintaining awareness of network connection cost or data plan status changes and enabling your app to use this information to avoid incurring additional costs for roaming or exceeding a specified data transfer limit. The [Windows.Networking.Connectivity](/uwp/api/windows.networking.connectivity) APIs lets you respond to [NetworkStatusChanged](/uwp/api/windows.networking.connectivity.networkinformation) and [TriggerType](/uwp/api/windows.applicationmodel.background.systemtrigger) events that sign. See [Quickstart: Managing metered network cost constraints](https://msdn.microsoft.com/library/windows/apps/Hh750310.aspx).
113
+
114
+
To debug or test your network cost-aware code, the simulator can mimic properties of a network that are exposed through the [ConnectionProfile](/uwp/api/windows.networking.connectivity.connectionprofile) object returned by [GetInternetConnectionProfile](/uwp/api/windows.networking.connectivity.networkinformation).
107
115
108
-
To simulate network properties:
116
+
To simulate network properties:
109
117
110
118
1. On the simulator toolbar, choose the **Change network properties** button.
111
119
@@ -123,24 +131,26 @@ The Visual Studio simulator for UWP apps is a desktop application that simulates
123
131
124
132
7. Choose **Set Properties** to simulate the network properties by triggering a foreground [NetworkStatusChanged](/uwp/api/windows.networking.connectivity.networkinformation) event and a background [SystemTrigger](/uwp/api/windows.applicationmodel.background.systemtrigger) of type **NetworkStateChange**.
125
133
126
-
**More information about managing network connections**
134
+
For more information about managing network connections, see:
[How to respond to system events with background tasks](/previous-versions/windows/apps/hh977058(v=win.10))
144
+
[How to respond to system events with background tasks](/previous-versions/windows/apps/hh977058(v=win.10))
137
145
138
-
[How to trigger suspend, resume, and background events in UWP apps](how-to-trigger-suspend-resume-and-background-events-for-windows-store-apps-in-visual-studio.md)
146
+
[How to trigger suspend, resume, and background events in UWP apps](how-to-trigger-suspend-resume-and-background-events-for-windows-store-apps-in-visual-studio.md)
139
147
140
148
## <aname="BKMK_Navigate_the_simulator_with_the_keyboard"></a> Navigate the simulator with the keyboard
141
-
You can navigate the simulator toolbar by pressing **CTRL + ALT + Up Arrow** to switch focus from the simulator window to the simulator toolbar. Use the **Up Arrow** and the **Down Arrow** to move between toolbar buttons.
142
149
143
-
You can shut down the simulator by pressing **CTRL + ALT + F4**.
150
+
You can navigate the simulator toolbar by pressing **CTRL + ALT + Up Arrow** to switch focus from the simulator window to the simulator toolbar. Use the **Up Arrow** and the **Down Arrow** to move between toolbar buttons.
151
+
152
+
You can shut down the simulator by pressing **CTRL + ALT + F4**.
153
+
154
+
## See also
144
155
145
-
## See Also
146
-
-[Run apps from Visual Studio](/visualstudio/debugger/debugging-windows-store-and-windows-universal-apps)
156
+
-[Run apps from Visual Studio](/visualstudio/debugger/debugging-windows-store-and-windows-universal-apps)
0 commit comments