:'(Help Please! I am new to C#. I am using VS Studios to develop Silverlight 4.0 business app. I have a page with a mediaelement on it and buttons to control the video. I have the video added to the project, I have set the Build Action to "Resource" but when I run the project, the video will not play, no matter what i do. Help please!

<MediaElement Name="media" Source="Wildlife.wmv" Visibility="Visible" AutoPlay="True" Margin="191,116,283,244" />

WHERE should I put the video? and how to set the source?

Recommended Answers

All 2 Replies

>WHERE should I put the video? and how to set the source?

Put video in root of the appplication and set property Copy to output Directory=Copy always from properties window.

PS:To play, you need a Media player version 10.0 or higher.

I have media player 12, and have the video in the root with output set to always, and I still can't get the video to play.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.