Taking a look at the Windows Simulator in Visual Studio 11

Introduction

Today, we are going to take a look at the Windows Simulator which ships with Visual Studio 11 and is used to debug Metro Style apps for Windows 8. I think it is important to learn about the features available in the simulator where we can  better understand the way our Metro applications behave. It is also beneficial for those of us without access to a touch-screen monitor.

Before we start, you can check out all of my Windows 8 Articles here.

We have three ways to debug a Metro Application

1) By default, if you run a Visual Studio 11 Metro Application it will run on the local machine.

image

2) You can also select Remote Machine and you will be presented with the “Select Remote Debugger Connection” as shown below:

image

image

This option deserves it own blog post, so for the time being just be aware that it exists.

3) The third and final way is Simulator – Which is what we are going to explore today.

image

Hold up!

What’s the difference between a simulator and a emulator?

Let’s say you want to duplicate the behavior of an old HP calculator, there are two options:

  1. You write new program that draws the calculator's display and keys, and when the user clicks on the keys, your programs does what the old calculator did. This is a Simulator

  2. You get a dump of the calculator's firmware, then write a program that loads the firmware and interprets it the same way the microprocessor in the calculator did. This is an Emulator

The Simulator tries to duplicate the behavior of the device.
The Emulator tries to duplicate the inner workings of the device.

This wonderful explanation was actually taken from Carlos Gutiérrez as he explained it to StackOverflow users.

Back to the Simulator

If you place a check in Simulator and run your application, you will see the following:

image

What is important to note here is that this simulation is actually a Remote Desktop Session into your machine.

Don’t believe me? Hit the Windows Start Button in the Simulator and you will see your desktop. You can browse, execute, and do everything you normally do.

image

The key thing to note here is the Touch Controls located to the right of the screen. Here is a quick reference that I created defining each item:

image

Let’s start with the fourth item down.

Touch Emulation

As soon as you select Touch Emulation and return to the simulator you cursor will look like the following:

image

This mode will simulate the user swiping with a single finger – one contact.

Touch Emulation Pinch/Zoom

As soon as you select Touch Emulation Pinch/Zoom and return to the simulator you cursor will look like the following:

 

image

This mode will simulate the users using multiple fingers to pinch/zoom in – two contacts. If you click the left mouse button and rotate the wheel simultaneously, the Windows Simulator will send touch events to the target application as if the user was performing a Pinch/Zoom gesture on a physical touch device. See the illustration below:

image

Touch Emulation Rotate

This mode will simulate the users using multiple fingers to rotate – two contacts. Looks like the Pinch/Zoom when first selected but when you use the mouse wheel it actually rotates the two contact points relative to each other.

image

Screen Rotation

Both of these settings will allow you to rotate the screen +90/-90 degrees to the left or right.

imageimage

 

image

Change Resolution

This mode will simply allow us to change the resolution inside the simulator to test our apps against different size tablets. You can see the various options available below.

image

Resizing

While this isn’t part of the touch control it is a handy tip.  You can resize the simulator by clicking on the bottom right corner and dragging your mouse cursor as shown below.

image

Wrap-up

As you can see from this post, the simulator is in a great shape starting from Day one. I normally wouldn’t expect this polished of a product until a later release. I believe this shows that Microsoft is committed to giving developers the right tools to build Metro applications. If you have any questions then feel free to contact me. Also, don’t forget to subscribe to my RSS feed and follow me on twitter.



Windows 8 WinRT
Posted by: Michael Crump
Last revised: 21 Dec, 2011 06:38 PM

Comments

23 Dec, 2011 11:48 AM

Hi,

Thanks for a great blog post. I was unaware of this feature. Does this also work if you run VS11 in Win7 ?

And can you remote debug a Win8 from VS11 from Win7 ?

(I could install and test, and I probably will :-)

Regards, Ronny

28 Dec, 2011 05:50 PM

Does this also work if you run VS11 in Win7 ? Unfortunately Not.

And can you remote debug a Win8 from VS11 from Win7 ? I haven't tried, but haven't seen anyone do it either.

02 Jan, 2012 06:29 AM

Today, the Microsoft Office 2010 United States began path, in Microsoft Outlook 2010 another way to research robots. The United States DARPA defense advanced research projects agency in Office 2010 Michigan university opened a research group,

Buy Cigarettes Online Ki
Buy Cigarettes Online Ki
18 Jan, 2012 09:38 PM

http://buy-cigaretteonline.com/ - Buy Cheap Cigarettes Online Dutyfree Tobacco Buy Cheap Cigarettes Online Dutyfree Tobacco Winston (Swiss Made) - Dutyfree Tobacco Buy Cheap Cigarettes Online Panter Mignon Deluxe Sweet Cigar - Dutyfree Tobacco Buy Cheap Cigarettes Online http://buy-cigaretteonline.com/cohiba.html - Cohiba - Dutyfree Tobacco Buy Cheap Cigarettes Online http://buy-cigaretteonline.com/parliament-super-slims-100s-central-europe-made.html - Parliament Super Slims 100s (Central Europe Made) - Dutyfree Tobacco Buy Cheap Cigarettes Online

asype
asype
20 Feb, 2012 11:07 AM

скачать Срочно сдаю квартиру однокомнатную м.Ясенево Сдам 3к. квартиру со всеми удобствами. Селькоровская 102 Вторчермет http://nf-ussr.ru/2010-01-02/48280.php - Сдается коттедж Киевское ш. 45 км от МКАД 3500 $ http://whmd.ru/26-03-2010/504c25.php - Продается Новорижское ш 110 км. Участок 9.44 га. Под дачное строительство.

No new comments are allowed on this post.

Hosting provided by http://www.DiscountASP.NET