Learn development in Windows Phone Mango with Rob Miles and Andy Wigley
1. Mango Jump Start (01): Building Windows Phone Apps with Visual Studio 2010
2. Mango Jump Start (02): Silverlight on Windows Phone—Introduction
3. Mango Jump Start (03): Silverlight on Windows Phone—Advanced
4. Mango Jump Start (04): Using Expression to Build Windows Phone Interfaces
5. Mango Jump Start (05): Windows Phone Fast Application Switching
6. Mango Jump Start (06): Windows Phone Multi-tasking & Background Tasks
7. Mango Jump Start (07): Using Windows Phone Resources (Bing Maps, Camera, etc.)
8. Mango Jump Start (08a): Application Data Storage on Windows Phone | Part 1
9. Mango Jump Start (08b): Application Data Storage on Windows Phone | Part 2
10. Mango Jump Start (09): Using Networks with Windows Phone
11. Mango Jump Start (10): Tiles & Notifications on Windows Phone
12. Mango Jump Start (11a): XNA for Windows Phone | Part 1
13. Mango Jump Start (11b): XNA for Windows Phone | Part 2
14. Mango Jump Start (12): Selling a Windows Phone Application
Namoskar!!!
If you are building application which is dependent on Accelerometer, then the Emulator allows you to test that. The below example was demonstrated on MIX11.
Let’s suppose you have image and based on the X or Y axis of your phone image will rotate.
<Image Height="428" HorizontalAlignment="Left" Margin="106,96,0,0" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="233" Source="/PhoneApp3;component/Images/Phone7.png" > <Image.Projection> <PlaneProjection x:Name="accImg" ></PlaneProjection> </Image.Projection> </Image>
You need to add the assembly Microsoft.Devices.Sensors. After that
Accelerometer _acc = new Accelerometer(); public AccelrmtrDemo() { InitializeComponent(); _acc.ReadingChanged += new EventHandler<AccelerometerReadingEventArgs>(_acc_ReadingChanged); _acc.Start(); } void _acc_ReadingChanged(object sender, AccelerometerReadingEventArgs e) { Dispatcher.BeginInvoke(() => { accImg.RotationY = -90 * e.X; accImg.RotationX = -90 * e.Y; }); }
Now you need to use the Emulator’s extender as below
And after that move the red pointer to have the feeling of actually moving the Windows Phone Device.