App Hub

article details

Code Samples for Windows Phone

Submitted
9/27/2010
Article

You can download the samples listed here to see how the Windows Phone APIs are used in practice or as a starting point for your applications.

Panorama/Pivot Sample

Unlike standard applications designed to fit within the confines of the phone screen, panoramic applications offer a unique way to view controls, data, and services by using a long horizontal canvas that extends beyond the confines of the screen. Alternatively, a pivot application provides a quick way to manage views or pages. The Panorama and Pivot Control sample demonstrates how to create both panoramic and pivot experiences for Windows Phone. For more information, see Pivot Control for Windows Phone and Panorama Control for Windows Phone.

Tilt Effect Sample

The tilt effect for Windows Phone controls enables you to add additional visual feedback for control interaction. It provides a tilt-ike response when the control is touched. The Control Tilt Effect sample demonstrates how to implement the tilt effect in an application. For more information on adding a tilt effect to the controls in your application, see Control Tilt Effect for Windows Phone.

Bing Maps Sample

The Map Maps Sample shows how to use the basic functionality of the Bing Maps Silverlight Control for Windows Phone 7. For more information about using the Bing Maps Silverlight Control, see Bing Maps Silverlight Control for Windows Phone.

Globalization Sample

This sample shows how to use the CultureInfo class to create a Globalized application. The user selects a Locale. The application then displays information such as date, time, and currency in the correct format for the selected locale. This sample has been updated to show localization of the Application Bar and the application title that appears in the phone’s application list. For more information about globalizing and localizing your application,see Globalization and Localization for Windows Phone.

Settings Sample

This sample shows two Settings screens, one where the settings changes take effect immediately, and one where the user has to confirm the changes. For more information about adding settings to your application, see How to: Create a Settings Page for Windows Phone.

Weather Forecast Sample

This sample shows how you can call and process data from a Web Service in a Windows Phone application. The sample calls a web service to get weather forecast information, parses the returned XML, and displays the information in a Weather Forecast page.

Photos Sample

This sample shows how to work with photos in a Windows Phone application. It includes using the CameraCaptureTask to enable the user to take a photo, crop the image, encode the image into JPEG format, and save it to the device’s media library. For more information about working with Photos, see Photos for Windows Phone.

Splash Screen Sample

This sample shows how Windows Phone applications can use a splash screen that looks like the initial page UI in order to provide a more pleasing user experience while the application is loading resources. For more information about splash screens, see How to: Create a Splash Screen for Windows Phone.

Mini-Browser Sample

This sample shows how to use the WebBrowser control in your Windows Phone application. The sample takes a URL from the user and navigates to the given page. The sample also automatically adjusts to portrait and landscape modes.

Application Bar Sample

This sample shows how to create an Application Bar for your Windows Phone application. This system control allows you to easily add menu functionality to your application that matches the look and feel of the device. This sample also allows you to adjust the visibility and opacity of the Application Bar so that you can see how the content of a page adapts to the menu. For more information about using the Application Bar, see Application Bar for Windows Phone.

Location Service Sample

This is a simple application that receives data from the Microsoft Location Service and displays the geographic coordinates of the device. For more information about the Microsoft Location Service, see Location for Windows Phone.

Accelerometer Sample

This sample shows you how to use the accelerometer to determine the orientation and motion of the phone. For more information about using the accelerometer, see Accelerometer for Windows Phone.

Hello XNA Framework Sample

This sample shows how to create a basic XNA Framework application. It demonstrates how to load content, move two graphics around the screen, detect when the graphics collide, and play a sound when a collision occurs. For more information about this sample, see How to: Create Your First XNA Framework Application for Windows Phone.

Reactive Extensions Location Service Emulation Sample

This sample shows how you can use Reactive Extensions for .NET Framework to emulate and filter Location Service data. If you're creating a location-aware application but don’t have access to a physical device, you can use this technique to develop by using the emulator. For more information on Reactive Extensions, see Reactive Extensions for .NET Overview for Windows Phone.

find education content
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG