Learning Windows Phone7 development together (14th. 3 Multimedia Task)

Source: Internet
Author: User

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 ();

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.