Esempio n. 1
0
        static void slider_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            Debug.WriteLine("slider_PreviewMouseLeftButtonUp " + sender.GetType().Name);
            var slider = (sender as FrameworkElement);

            MouseDownHelper.SetIsMouseDown(slider, false);
            MouseDownHelper.SetIsMouseLeftButtonDown(slider, false);
            SetPlaying(slider);
        }
Esempio n. 2
0
 static void slider_MouseLeave(object sender, MouseEventArgs e)
 {
     foreach (var sliderData in _sliders)
     {
         sliderData.Slider.Tag = null;
         MouseDownHelper.SetIsMouseDown(sliderData.Slider, false);
         MouseDownHelper.SetIsMouseLeftButtonDown(sliderData.Slider, false);
     }
 }
Esempio n. 3
0
        static void slider_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (sender is Thumb)
            {
                MouseButtonEventArgs args = new MouseButtonEventArgs(e.MouseDevice, e.Timestamp, MouseButton.Left);
                args.RoutedEvent = Thumb.MouseLeftButtonUpEvent;
                (sender as Thumb).RaiseEvent(args);
                return;
            }

            Debug.WriteLine("slider_PreviewMouseLeftButtonDown " + sender.GetType().Name);
            var slider = (sender as FrameworkElement);

            SetSliderState(slider, true);
            MouseDownHelper.SetIsMouseDown(slider, true);
            MouseDownHelper.SetIsMouseLeftButtonDown(slider, true);
            if (slider.Tag == null)
            {
                SetPaused(slider);
            }
        }