[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 660
  • Last Modified:

Urgent - Media Element Not working

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
Trying_to_Learn
Asked:
Trying_to_Learn
  • 3
  • 3
1 Solution
 
Trying_to_LearnAuthor Commented:

'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
 
CodeCruiserCommented:
Are you sure the source address is correct?
0
 
Trying_to_LearnAuthor Commented:
Yes the source address is correct, or else it would give me an error in the xaml
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
CodeCruiserCommented:
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
 
Trying_to_LearnAuthor Commented:
Thanks!
0
 
CodeCruiserCommented:
What was the problem?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now