Yesterday, we came to know about Accelerometer of Windows Phone 7. We also learnt about the structure of the Accelerometer class and it's base class. Now, it's the time to see how to run the same inside the Phone emulator. In this post we are going to see the accelerometer tool that comes with the Phone 7 emulator.
Read more to know how to run the accelerometer tool and what customization we can do with this tool. This will be beneficial for you when we discuss more about the topic with a sample application.
Index - Windows Phone 7 (Mango) Tutorial
Launching the Accelerometer Tool
You need this tool to run your accelerometer application inside the Phone emulator. You can launch the window from the emulator option panel as shown below:
Click the arrow head to open the Accelerometer tools window in the screen. This will look as shown below:
What's Present in the Tool?
In the tool window, we have different options present to do various things with the emulator screen. You can change the Orientation of the Phone. There are 4 types of orientation available for you named as Portrait Standing, Landscape Standing, Portrait Flat and Landscape Flat. Change the orientation to see it in action.
Changing the orientation to Landscape standing will make the UI look like this:
The 'X', 'Y' and 'Z' coordinates shows the present (x,y,z) location of the current point. There is another dropdown called "Recorded Data" which actually plays a shake effect to the emulator.
You may notice a circle at the middle of the screen. What is that? If you drag the circle, you will actually see the phone device rotating in the 3D space and at the same time you will see how it looks in the phone emulator. We will see more on this in the demo post.