Code Samples for Windows Phone

I have found few direct code implemented source on MSDN for Win Phone as follow in following link :Code Samples for Windows Phone

Windows Phone

This is pre-release documentation for the Windows Phone OS 7.1 development platform. To provide feedback on this documentation, click here. For the Windows Phone OS 7.0 developer documentation, click here.

May 24, 2011

Windows Phone developers can download these code samples and applications, such as Panorama/Pivot Control, Bing Maps, and a unit converter, to experiment with the Windows Phone Application Platform. New samples will be added to this page periodically, so check back often and see what’s new.

You need Windows Phone Developer Tools to run these samples. To download Windows Phone Developer Tools, see Installing Windows Phone Developer Tools.

For XNA-specific samples, see the XNA content catalog.

New Samples for Windows Phone OS 7.1


The following code samples for Windows Phone OS 7.1 are available for download

Basic Camera Sample

Basic Camera Sample

Learn the basics for using the device camera in your own application. This sample demonstrates how to activate the shutter and auto focus, configure picture resolution and flash settings, and use the hardware shutter button. You can develop this application step-by-step by following along with a series of topics, starting with How to: Create a Base Camera Application for Windows Phone.

Download Sample: C#

Camera Greyscale Sample

Camera Grayscale Sample

Learn how to alter live video frames in your own application. This sample demonstrates how to take ARGB (Alpha, Red, Green, Blue) frames from the camera, convert them to grayscale, and then display them on the screen – as the camera is rolling. For step-by-step information about how to develop this application, see How to: Work with Grayscale in a Camera Application for Windows Phone.

Download Sample: C#

Search Extensibility Sample

Search Extensibility Sample

Search Extras are a new way for your applications to seamlessly extend the Search experience on Windows Phone. Learn how to integrate your application with search result item cards. This sample is a fictitious product recall application that you can launch from the extras pivot of an item card from a product search. If you do not have a Windows Phone OS 7.1 device, edit the DefaultTask element in the application manifest to simulate a Search Extras call in the emulator. For more information, see Search Extensibility Overview for Windows Phone.

Download Sample: C#

Local Database Sample

Local Database Sample

On Windows Phone OS 7.1, you can use LINQ to SQL to store relational data in a local database that resides in your application’s isolated storage container. This sample is a basic to-do list application. Items that appear in the list are added, updated, and deleted from a local database, where they will persist between application launches. For information about how to develop this application step-by-step, see How to: Create a Basic Local Database Application for Windows Phone.

Download Sample: C#

Silverlight XNA Framework Sample

Silverlight/XNA Framework Sample

This sample combines Silverlight and the XNA Framework into a single Windows Phone application. It demonstrates how to render Silverlight controls and text from the XNA Framework by using the UIElementRenderer class. Also see the My Little Teapot Sample and How to: Combine Silverlight and the XNA Framework in a Windows Phone Application.

Download Sample: C#

My Little Teapot Sample

My Little Teapot Sample

This sample combines Silverlight and the XNA Framework into a single Windows Phone application. It includes using a Silverlight storyboard to animate controls and using the Silverlight input system to respond to user gestures. Also see the Silverlight/XNA Framework Sample and How to: Combine Silverlight and the XNA Framework in a Windows Phone Application.

Download Sample: C#

Ringtones Sample

Ringtones Sample

This sample implements a simple application that allows the user to save a custom ringtone to the Windows Phone ringtone library where it can be selected as the system ringtone or assigned to a specific contact. It includes code to preview the ringtone and simulates an architecture that would enable downloading ringtones from a remote location. Also see How to: Use Choosers for Windows Phone.

Download Sample: C#

Background Audio Player Sample

Background Audio Player Sample

This sample implements an AudioPlayerAgent that allows audio to play even when the application is not in the foreground. This background agent will run under the lock screen where the user can control the audio using the universal volume control (UVC). Also see How to: Play Background Audio for Windows Phone.

Download Sample: C#

Tic Tac Toe Over Sockets Sample

Tic-Tac-Toe Over Sockets Sample

This sample demonstrates the use of sockets on a Windows Phone device to communicate with a service hosted on the network. It uses the new System.Net.Sockets class available on Windows Phone. For more information, see Sockets for Windows Phone.

Download Sample: C#

Shake Gesture Library Sample

Shake Gesture Library Sample

This sample uses the Shake Gesture Library provided by the Windows Phone team to test shake data that was prerecorded in the Windows Phone Emulator. For more information about using the simulated accelerometer data provided by Windows Phone Emulator, see How to: Test Applications that Use the Accelerometer.

Download Sample: C#

Tile Sample

Tile Sample

Demonstrates how to create, update, and delete secondary Tiles. The Tile updates demonstrate how to update the properties on both the front and back of a Tile. The update techniques can also be applied to Application Tiles. For more information, see Tiles Overview for Windows Phone.

Download Sample: C#

Shell Tile Schedule Sample

Shell Tile Schedule Sample

Demonstrates how to update the background image on the front of the Tile on a regular schedule. Background images on the front of a secondary Tile can be updated in the same way. For more information, see Tiles Overview for Windows Phone.

Download Sample: C#

Tile Notification Sample

Tile Notification Sample

Demonstrates how to update a Tile using the Microsoft Push Notification Service. This sample contains two projects – one project for the client code that sets up the Windows Phone device to receive a notification and another project that sends the notification to the Microsoft Push Notification Service. For more information, see Push Notifications for Windows Phone.

Download Sample: C#

Toast Notification Sample

Toast Notification Sample

Demonstrates how to send a toast notification to a Windows Phone using the Microsoft Push Notification Service. This sample contains two projects – one project for the client code that sets up the Windows Phone device to receive a notification and another project that sends the notification to the Microsoft Push Notification Service. For more information, see Push Notifications for Windows Phone.

Download Sample: C#

Raw Notification Sample

Raw Notification Sample

Demonstrates how to send data to a Windows Phone using a raw notification. This sample contains two projects – one project for the client code that sets up the Windows Phone device to receive a notification and another project that sends the notification to the Microsoft Push Notification Service. For more information, see Push Notifications for Windows Phone.

Download Sample: C#

Reminder Sample

Reminder Sample

This sample shows you how to use the Scheduled Action Service to schedule and manage Reminders. Reminders are dialogs that pop up and display a message to the user at a time scheduled by the application that created them. For more information, see How to: Create Reminders for Windows Phone.

Download Sample: C#

Background Transfer Sample

Background Transfer Service Sample

This sample shows you how to use the Background Transfer Service to schedule and manage background file transfers. For more information, see How to: Implement Background File Transfers for Windows Phone.

Download Sample: C#

Execution Model Sample

Execution Model Sample

On Windows Phone , only one application runs in the foreground at a time. When the user navigates away from an application, it is typically put into a dormant state which is automatically resumed when the user returns. However, it is possible for an application to be tombstoned or terminated after the user navigates away. This sample illustrates a technique for preserving and restoring UI and application state as the application is activated and deactivated by the operating system. For more information, see Execution Model Overview for Windows Phone.

Download Sample: C#

Raw Sensor Data Sample

Raw Sensor Data Sample

This sample shows you how to obtain data from the Compass, Accelerometer, and Gyroscope sensors. For more information, see Sensors Overview for Windows Phone.

Download Sample: C#

Simple Motion Sample

Simple Motion Sample

The Motion API uses multiple device sensors to calculate the position and motion of the device. This example uses the Yaw component of the device’s attitude to rotate a triangle. For more information, see How to: Use the Combined Motion API for Windows Phone

Download Sample: C#

Augmented Reality Motion Sample

Augmented Reality Motion Sample

This sample uses the Motion API and the PhotoCamera class to create an Augmented Reality application that lets you pin labels to points in space as you rotate the device. For more information, see How to: Use the Combined Motion API for Windows Phone.

Download Sample: C#

Background Agent Sample

Background Agent Sample

This sample creates and registers a Periodic and a Resource-intensive background agent. These agents are able to execute code in the background, even when the application that created them is not running in the foreground. For more information, see Scheduled Tasks Overview for Windows Phone.

Download Sample: C#

Samples for Windows Phone 7.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: