Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys!

I have a Problem, its that my Mediaelement properties dont work as expected.

My questions explains the scenario, after an hour searching for people with the same problem, i didn't find anything about this problem.

Here's my Code, i hope it's an easy thing for you:

My Xaml:
<MediaElement  x:Name="MediaelementVideoPlayer" HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Width="Auto" Margin="0,31,0,42" LoadedBehavior="Manual" Stretch="Uniform" MouseMove="MouseMoveMediaElementVideoPlayer" MouseLeave="MediaelementVideoPlayer_MouseLeave" MouseEnter="MediaelementVideoPlayer_MouseEnter" MouseLeftButtonDown="MediaelementVideoPlayer_MouseLeftButtonDown" MediaFailed="MediaelementVideoPlayer_MediaFailed" MediaOpened="MediaelementVideoPlayer_MediaOpened" BufferingStarted="MediaelementVideoPlayer_BufferingStarted" BufferingEnded="MediaelementVideoPlayer_BufferingEnded"/>


My C#:
C#
private void MediaelementVideoPlayer_BufferingStarted(object sender, RoutedEventArgs e)
        {

            BufferTimer.Interval = new TimeSpan(0, 0, 1);
            BufferTimer.Tick += new EventHandler(TimerBufferTick);
            BufferTimer.Start();
            
        }

        public void TimerBufferTick(object sender, EventArgs e)
        {
            LabelCrtDownloadProgress.Content = (MediaelementVideoPlayer.DownloadProgress).ToString();
        }


Im using .Net Framework 4.0.

Big Thanks!! :)
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900