Qt to WP7 - Chapter 7: Windows Phone Example Applications

Date: Monday, September 19, 2011, 5:35:16 PM

Tags: Qt

Table of Contents

< Back to Qt to WP7 Guide contents

As we have seen in the previous chapters, the Windows Phone (WP) application architecture and application design differs from the Symbian Qt application architecture. Even though several similarities exist and many parts of existing work can be reused during transition from Symbian Qt C++ applications to WP C# applications, there are also some application areas where fundamental differences exist and/or comparisons between Symbian Qt C++ and WP C# are hard to express.

We try to address those areas by introducing a set of example applications that assist in binding Symbian Qt C++ and WP C# application development closer to each other. This chapter presents WP C# example applications on Application UI, device integration, networking and data management area. Full application code is provided to illustrate WP C# programming concepts on before-mentioned application areas, in addition to showcasing common structures of WP C# applications and topics introduced in the previous chapters.

Another purpose is to provide more practical-oriented approach to the transition from Symbian Qt C++ to WP C# application development. Ready-made example applications of good quality and covering several use cases show you the preferred way of implementing certain features in WP C# applications.

Windows Phone General Examples

The following table lists general purpose example applications for Windows Phone. These example application and starter kits demonstrate many essential features in WP application development.

Application

Description

Related information

Execution Model Sample

This sample illustrates a technique for preserving and restoring UI and application state as the application is activated and deactivated by the operating system.

Execution Model Overview for Windows Phone

Unit Converter Starter Kit

This starter kit demonstrates how to apply the Model-View-ViewModel design pattern in Windows Phone application, how to optimize application start up and how to create a context sensitive menu.

Unit Converter Starter Kit for Windows Phone

Level Starter Kit

This starter kit demonstrates how to make Windows Phone application's color scheme match the user's theme choice, how to make Silverlight application interact realistically with the accelerometer of the phone and how to customize phone orientation sensing.

Level Starter Kit for Windows Phone

Translator Starter Kit

This starter kit demonstrates how to call a web service, how to use an XNA Framework API from within a Silverlight application to play a sound, how to maintain a history list in isolated storage and how to animate an image in aToggleButton.

Translator Starter Kit for Windows Phone

Windows Phone Application UI Examples

The following table lists example applications from Windows Phone Code Samples demonstrating how to implement several WP application UI concepts.

Application

Description

Related information

Back Stack Navigation Sample

This sample shows how to visualize, inspect and modify the navigation history, or back stack, of an application. This sample uses the newBackStackproperty and theRemoveBackEntry()method available in Windows Phone OS 7.1.

How To: Navigate Using the Back Stack for Windows Phone

Application Bar Sample

This sample enables you to dynamically test the differentApplicationBarproperties, such asOpacityandModeas well as different colors. This sample contains application bar code for a plain page, a pivot page and a panorama page.

Walkthrough: Creating an Application Bar Test Application for Windows Phone

Silverlight/XNA Framework Sample

This sample combines Silverlight and the XNA Framework into a single Windows Phone application. This sample demonstrates how to render Silverlight controls and text from the XNA Framework by using theUIElementRendererclass.

How to: Combine Silverlight and the XNA Framework in a Windows Phone Application

MyLittleTeapot Sample

Tile Sample

This 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.

Tiles Overview for Windows Phone

Shell Tile Schedule Sample

Tile Notification Sample

This 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

Push Notifications for Windows Phone

Toast Notification Sample

Raw Notification Sample

;

Scheduled Notification Sample

This sample shows 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.

How to: Create Alarms and Reminders for Windows Phone

Windows Phone Device Integration Examples

The following table lists example applications from Windows Phone Code Samples demonstrating how applications can integrate with device hardware and platform.

Application

Description

Related information

Background Audio Player Sample

This sample implements anAudioPlayerAgentthat 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).

How to: Play Background Audio for Windows Phone

Background Audio Overview for Windows Phone

Device Status Sample

This sample demonstrates how to use theDeviceStatus, including accessing the properties of the class, to determine if the power source of the device has changed and to determine if a physical keyboard has been deployed.

How to: Use the DeviceStatus Class for Windows Phone.

Basic Camera Sample

This sample demonstrates how to activate the shutter and auto focus for camera, how to configure picture resolution and flash settings and how to use the hardware shutter button. This sample also demonstrates touch focus and a front-facing camera for the devices that support those features.

How to: Create a Base Camera Application for Windows Phone

Camera Color Conversion (YCbCr to ARGB) for Windows Phone.

How to: Work with Grayscale in a Camera Application for Windows Phone

Video Recorder Sample

This sample demonstrates video preview, recording and playback. It uses theFileSinkclass to write video to isolated storage, from which the video can be played afterward.

How to: Record Video in a Camera Application for Windows Phone

Raw Sensor Data Sample

This sample shows how to obtain data from the Compass, Accelerometer and Gyroscope sensors.

Sensors Overview for Windows Phone

Music + Videos Hub Sample

This sample shows how to use theMediaHistoryandMediaHistoryItemclasses to create a Music + Videos Hub application. It also uses the XNAMediaPlayerclass to control playback of music.

How to: Integrate with the Music and Videos Hub for Windows Phone

Windows Phone Data Management Examples

The following table lists example applications from Windows Phone Code Samples that demonstrate different data management scenarios.

Application

Description

Related information

Background Transfer Service Sample

This sample shows you how to use the Background Transfer Service to schedule and manage background file transfers.

How to: Implement Background File Transfers for Windows Phone

Contacts and Calendar Sample

This sample demonstrates how to access contacts and appointments, and display the details by using data-binding. It also demonstrates two different techniques for displaying contact photos.

Contacts and Calendar for Windows Phone

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 to-do list application that uses a multi-table local database. Items that appear in the list are added, updated and deleted from a local database, where they will persist between application launches

How to: Create a Local Database Application with MVVM for Windows Phone

Bing Maps Sample

This sample demonstrates how to use the basic functionality of the Bing Maps Silverlight Control for Windows Phone.

Bing Maps Silverlight Control for Windows Phone

Location Service Sample

This sample application receives data from the Microsoft Location Service and displays geographic coordinates of the device.

Location for Windows Phone

Search Extensibility Sample

Search Extras are a new way for 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 page of an item card from a product search. If you do not have a Windows Phone OS 7.1 device, edit theDefaultTaskelement in the application manifest to simulate a Search Extras call in the emulator.

Search Extensibility Overview for Windows Phone

Windows Phone Networking Examples

The following table introduces two example applications from Windows Phone Code Samples demonstrating multicast group communication and use of sockets.

Application

Description

Related information

Multicast Sockets Sample

This sample demonstrates how to communicate over a multicast group in a Windows Phone application. It implements the classic Rock Paper Scissors game. Players join a multicast group to discover each other. UDP unicasting is then used to challenge a player and play the actual game. TheUdpAnySourceMulticastClientclass available in Windows Phone OS 7.1 is used in this sample.

How to: Send and Receive Data in a Multicast Group for Windows Phone.

Tic-Tac-Toe Over Sockets Sample

This sample demonstrates the use of sockets in a Windows Phone application to communicate with a service hosted on the network. It uses the newSystem.Net.Socketsclass available on Windows Phone.

Sockets for Windows Phone

Summary

In this chapter we took a look at several types of Windows Phone example applications. Lots of essential functionality, features and use cases within Application UI, device integration, data management and networking areas were covered with these sample applications.

Related Resources

To know more about the example applications and get started with application development for Windows Phone, visit:

Other Resources you may find useful:

< Back to Qt to WP7 Guide contents

 
blog comments powered by Disqus