Ejemplo n.º 1
0
        private void ThumbOnDragDelta(object sender, DragDeltaEventArgs e)
        {
            Thumb     thumb     = sender as Thumb;
            TextBlock textBlock = thumb.FindChild <TextBlock>("NValueTextBlock");

            var videoSlider = _slider.FindVisualParent <VideoSlider>();

            DateTime beginDateTime = new DateTime();
            DateTime endDateTime   = videoSlider.EndTime;

            double   val     = ((endDateTime - beginDateTime).TotalMilliseconds * _slider.Value) / 100;
            DateTime resTime = beginDateTime + TimeSpan.FromMilliseconds(val);

            videoSlider.Value = resTime;

            textBlock.Text = resTime.ToString("HH:mm:ss");
        }