Hi , first of all i would suggest to add such propertsion to MediaElement declaration
And the question is formed what kind of media did you play ??
Is it a buffered ? or it is just from file ?
According to answer , default media behaviors could be applied
Ok , if it not buffered try to do the next:
<slider x:name="timelineSlider" thumb.dragstarted="seekBar_DragStarted" thumb.dragcompleted="seekBar_DragCompleted">
private void mediaElement1_MediaOpened(object sender, RoutedEventArgs e)
{
TimeSpan ts = mediaElement1.NaturalDuration.TimeSpan;
timelineSlider.Maximum = ts.TotalSeconds;
timelineSlider.SmallChange = 1;
timelineSlider.LargeChange = Math.Min(10, ts.Seconds / 10);
}
private void seekBar_DragCompleted(object sender, DragCompletedEventArgs e)
{
mediaElement1.Position = TimeSpan.FromSeconds(timelineSlider.Value);
}