Hands-on experiment
Experiment 4: Application bar and media capture
September 2012
Brief introduction
The Windows.Media.Capture namespace in the Windows runtime contains a series of classes that facilitate capturing the media and incorporating it into the Windows Store application. In particular, the Cameracaptureui class makes it easy to take pictures and capture video from webcam. Cameracaptureui can even handle devices that contain two cameras (one front, one back) and provide a simple, intuitive user interface for switching between the two.
In this experiment, you will enhance the functionality of Contoso cookbook by allowing users to take photos and videos created by their favorite recipes and share them with other applications. You will also add the application bar to provide shortcuts to these features and learn how to incorporate pop-up menus into the application bar commands.
Goal
This experiment will show you how to:
Implement the application bar in the Windows Application Store application.
Add commands and menus to the application bar.
Take a photo when you use Windows Runtime.
Capture video using the Windows runtime.
Share photos and videos with shared contracts.
System Requirements
You need the following software to complete this experiment:
Microsoft Windows 8
Microsoft Visual Studio 2012
Set up
You must perform the following steps to prepare the computer for this experiment:
1. Install Microsoft Windows 8.
2, install Microsoft Visual Studio 2012.
Practice
This hands-on experiment includes the following exercises:
1, add the application bar
2. Add Photo Capture
3. Add video Capture
Estimated time of completion of this experiment: 30-40 minutes.
Exercise 1: Add an application Bar
Before we add the ability to allow Contoso cookbook users to capture and share photos and videos, we need to modify the user interface to provide access to these features. The application bar is the perfect tool for accomplishing this work.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/net/