1. Photo: Call the image program, select an image, and crop the image according to the settings.
Photo. ShowCamera = true; // whether to display the camera program. However, I didn't see the effect on the simulator.
Photo. PixelWidth = 100; // you can specify the cropping size.
Photo. PixelHeight = 100; // you can specify the cropping size.
Photo. Completed + = new EventHandler <PhotoResult> (photo_Completed );
Photo. Show ();
Ii. Camera: the Camera program cannot be used in the simulator.
CameraCaptureTask camera = new CameraCaptureTask ();
Camera. Completed + = new EventHandler <PhotoResult> (camera_Completed );
Camera. Show ();
3. Media Player: Phone7 not only provides the Media player control but also provides tasks to directly call the system's Media Player program. However, these two are very different. controls can be embedded into applications, and the Task is called by the system, which looks the same, but this is an independent application, and there are corresponding control button settings (although I didn't see these buttons ).
MediaPlayerLauncher mediaplayer = new MediaPlayerLauncher ();
Mediaplayer. Controls = MediaPlaybackControls. None; // No control button
// Mediaplayer. Controls = MediaPlaybackControls. All; // display All control buttons (and no buttons are displayed)
Mediaplayer. Location = MediaLocationType. Install; // the video frequency is under the installation directory (\ Install \ Medias \ Wildlife. wmv)
// Mediaplayer. Location = MediaLocationType. Data; // the video frequency is in the IsolateStroage directory (\ Data \ IsolatedStore \ Medias \ Wildlife. wmv)
Mediaplayer. Media = new Uri ("Media/Wildlife. wmv", UriKind. Relative );
Mediaplayer. Show ();