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#:
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!! :)