Share via


Inserting audio and video (Blend for Visual Studio)

In Blend for Visual Studio 2012, you can add media files to your project such as audio and video.

For instructions about how to add a media files to your project, see Insert an audio or video file into the active document (Blend for Visual Studio).

Audio

Blend supports audio file types such as AC3 (DD, DD+), AVI, ADTS, ASF, MPEG-2, MP3, MP4, WAV, and WMA. These are all file formats that Windows Media Player 10 supports.

After you add an audio file to your project, you can add it to the artboard by double-clicking the audio file name in the Projects panel, or by setting the Source property of an existing MediaElement control to the name of the audio file.

Video

Blend supports video file types such as ASF, AVI, MPEG-2, MPEG-4 (H.263, H.264), MPG, VC-1, Motion-JPG, and WMV9.

After you add a video file to your project, you can add it to the artboard by double-clicking the video file name in the Projects panel, or by setting the Source property of an existing MediaElement control to the name of the video file. You can add a MediaElement control from the Assets panel to your document and then modify its Source property in the Properties panel, under the Media category to point to a media file type that Blend does not recognize to make sure that the video plays in your application at run time.

The MediaElement begins playing when the page loads and to suppress media from automatically playing, uncheck the checkbox next to AutoPlay property in the Properties panel under the Media category or set the AutoPlay property to False in the Code editor.

Warning

Blend does not support playing the media on the artboard. To test your media, build and then run the application.

Modifying audio and video properties

After you insert an audio file or video clip into your document, you can control its run-time behavior (such as AutoPlay, Volume, IsLooping, PlaybackRate, and so on) using the Media category in the Properties panel.

Media category pane

For more information, see Adding multimedia (Windows Store apps using C#/VB/C++ and XAML) on Windows Dev Center.

See Also

Tasks

Remove an audio or video file (Blend for Visual Studio)