Skip to main content
Home Forums Silverlight Design Video and Media I need a help on playing music
9 replies. Latest Post by banderastyle28 on October 28, 2009.
(0)
banderas...
Member
9 points
56 Posts
10-21-2009 3:46 AM |
ok here is my problem I'm new to silverlight what I want is when I click a picture on my page it goes to media .wmv clip how do I do that thank you
mchlsync
Star
14606 points
2,730 Posts
10-21-2009 4:07 AM |
Use MediaElement to play the song. Example http://blogs.silverlight.net/blogs/msnow/archive/2008/07/25/tip-of-the-day-22-how-to-add-sound-effects-music-and-video-to-your-silverlight-app.aspx
Pravinku...
Contributor
4300 points
708 Posts
10-21-2009 4:24 AM |
On the MouseLeftButtonDown event of your image control, change the visibility property of you image. And then show the MediaElement control by setting it's visibility property to show the media element. Keep you Media file in ClientBin folder and set the source property of the mediaElement control by the name of your media file. for example - Source="niceday.wmv"
Check the below link for more information on MediaElement-
http://pkrd.blogspot.com/2009/05/working-with-mediaelement-control-in.html
Thanks,
Pravin
"Please mark as answered, if this answers your question"
10-21-2009 6:49 PM |
Thank you very much very helpful your llink now my problem I need to build like media player control you know
10-23-2009 1:09 AM |
Hi,
You can create media Skins using XAML for your MediaElement. Check the below word document. It may help you out.
http://download.microsoft.com/download/0/6/b/06b97375-6594-402d-b627-ab561d0859b2/Creating%20silverlight%20player%20templates.docx
You can even use Expression Bend 3 to design MeidaElement skins. I did it in a very simple way. You use few nice images to design MediaElement. Check this out-
10-24-2009 2:43 AM |
Hello I apreciate your help here is
the page http://theindieshow.vircas.com/ I want the whole the thing to be a silverlight application when you click on the picture it takes you to a video encoder that I encoded in expression encoder
10-26-2009 1:04 AM |
This is very simple. Use Expression Blend 3 to make a design like the link shows in your case. Use StackPanel to arrange the images horizontally and vertically. Use the LeftMouseButtonDown event of Image which will show the MediaElement control with the video based on the selection of the Image.
Check the link Below where you can use Silverlight Media Player including the Thumbnails which are encoded with Encoder.
http://silverlight3.codeplex.com/
10-26-2009 5:32 PM |
thank you for your help now can you tell me how I should put the function on LeftMouseButtondown. Let say I MediaPlayer.xap that I encoded with encoder 3 in my output folder and bear.wmv is my clip thank youprivate void MediaElement(object sender, System.Windows.Input.MouseButtonEventArgs e) { // TODO: Add event handler implementation here.
{
}
10-27-2009 12:37 AM |
When you set the source propoerty of the image for example using VS 2008, you can find MouseLeftButtonDown event for every image on which you can write you code.
10-28-2009 5:23 PM |
thank you I deeply apreciate your help it helped me a lot