Solved

Urgent - Media Element Not working

Posted on 2010-11-30
6
647 Views
Last Modified: 2012-05-10
Hi,

I have a media element in my wpf application and nothing happens when I click it!!

please see my code below - I need this ASAP

Question worth 1000 points!~
0
Comment
Question by:Trying_to_Learn
  • 3
  • 3
6 Comments
 

Author Comment

by:Trying_to_Learn
Comment Utility

'The button which plays the video element



Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button2.Click

            MediaElement1.Play()

            MediaElement1.IsEnabled = MediaElement1.IsLoaded

            Button_Coder_Trailers(Button2)

        End Sub

' The code for the media element

<MediaElement Source="/MoviesOnTheGo;component/morningglory_trlr_01_480p_dl.wmv" Name="MediaElement1" LoadedBehavior="Play" Margin="0,0,0,0" Stretch="Fill" UnloadedBehavior="Manual" />

Open in new window

0
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
Are you sure the source address is correct?
0
 

Author Comment

by:Trying_to_Learn
Comment Utility
Yes the source address is correct, or else it would give me an error in the xaml
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
Comment Utility
Two points

1) MoviesOnTheGo;component (you are using ; in a path?)

2) In Microsoft examples, they use \ instead of / that you are using in the path.

http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.source.aspx
0
 

Author Closing Comment

by:Trying_to_Learn
Comment Utility
Thanks!
0
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
What was the problem?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Object to array 7 26
Crystal Report for VS2013 17 36
Form design in vb.net 7 17
Get String split 5 31
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now