Home > database >  Visual Studio WPF MediaElement not Displaying the video
Visual Studio WPF MediaElement not Displaying the video

Time:02-28

This is my first time asking a question here. Sorry for my stupid question, I hope you people won't get mad at me. So I was following a tutorial (https://youtu.be/-zM486rVopk) then at the MediaElement part I am having a difficulty understanding on what's the source of my problem.

<MediaElement Grid.Column="4" Grid.Row="1" Grid.RowSpan="6" Source="C:\Users\Name\Documents\Visual Studio Workspace\WPFDemo\Resources\Crying Meme.mp4" />

Screenshots: Solution Explorer Properties

So I tried dragging the video file towards the form but this error message popped up...

Error: Error Pop up message

I don't know what it means, I'm pretty new to these things and I hope you understand. I'm sorry for wasting your time but I wish someone can help with my problem. Thanks in advance!

CodePudding user response:

it looks like it's a path problem, try this:

<MediaElement Grid.Column="4" Grid.Row="1" Grid.RowSpan="6" Source="/Resources/Crying Meme.mp4" />
  • Related