private void Page_Loaded(object sender, RoutedEventArgs e) { Thumb volSliderThumb = FrameworkElementExtensions.FindChildOfType <Thumb>(positionSlider); if (volSliderThumb != null) { volSliderThumb.DragCompleted += VolSliderThumb_DragCompleted; volSliderThumb.DragStarted += VolSliderThumb_DragStarted; } Window.Current.CoreWindow.PointerPressed += (ea, a) => { if (positionSlider.GetBoundingRect().Contains(a.CurrentPoint.Position)) { isPressed = true; ShellVM.DontUpdatePosition = true; } }; Window.Current.CoreWindow.PointerReleased += (ea, a) => { if (isPressed) { UpdatePosition(true); isPressed = false; } }; }
private void Page_Loaded(object sender, RoutedEventArgs e) { Thumb volSliderThumb = FrameworkElementExtensions.FindChildOfType <Thumb>(positionSlider); volSliderThumb.DragCompleted += VolSliderThumb_DragCompleted; volSliderThumb.DragStarted += VolSliderThumb_DragStarted; Player.MediaStateChanged += Player_MediaStateChanged; }
private void Page_Loaded(object sender, RoutedEventArgs e) { Thumb volSliderThumb = FrameworkElementExtensions.FindChildOfType <Thumb>(positionSlider); if (volSliderThumb != null) { volSliderThumb.DragCompleted += VolSliderThumb_DragCompleted; volSliderThumb.DragStarted += VolSliderThumb_DragStarted; } }