void slider_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { MySlider slider = (MySlider)sender; slider.AnimateSlider(SliderAnimateMode.Show); e.Handled = true; }
void scroller_ScrollChanged(object sender, RoutedEventArgs e) { StickyWindowModel stickyWindow = (StickyWindowModel)sender; MySlider slider = stickyWindow.sSlider; slider.HandleScrollChange(stickyWindow); e.Handled = true; }
private void AnimateSliderPeek(MySlider mySlider, Visibility vis) { switch (vis) { case Visibility.Visible: mySlider.Visibility = Visibility.Visible; mySlider.BeginAnimation(Canvas.RightProperty, new DoubleAnimation(-20, -5, new TimeSpan(0, 0, 0, 0, 500))); break; case Visibility.Hidden: mySlider.BeginAnimation(Canvas.RightProperty, new DoubleAnimation((double)this.GetValue(Canvas.RightProperty), -20, new TimeSpan(0, 0, 0, 0, 500))); break; } }