示例#1
0
        internal void StopScroll(MControl scrollViewer)
        {
            double value = scrollViewer.VerticalOffset;

            storyBoard.BeginAnimation(MControl.VerticalOffsetProperty, null);
            scrollViewer.VerticalOffset = value;
        }
示例#2
0
        private static void VerticalOffsetPropertyChanged(object sender, DependencyPropertyChangedEventArgs args)
        {
            MControl cThis = sender as MControl;
            double   value = (double)args.NewValue;

            System.Diagnostics.Debug.WriteLine("Animation: " + value);
            cThis.scroller.ScrollToVerticalOffset(value);
        }
示例#3
0
        internal void StartScroll(MControl scrollViewer, double ToValue, bool IsMove, int?time = null)
        {
            if (IsMove)
            {
                verticalAnimation.KeyFrames.Clear();
                verticalAnimation.Duration = new TimeSpan(0, 0, 0, 0, 20);
                verticalAnimation.KeyFrames.Add(new LinearDoubleKeyFrame(ToValue, new TimeSpan(0, 0, 0, 0, 20)));

                System.Diagnostics.Debug.WriteLine("Time: " + ToValue);
                storyBoard.Begin();
            }
            else
            {
                storyBoard.BeginAnimation(MControl.VerticalOffsetProperty, null);
                scrollViewer.VerticalOffset = ToValue;

                System.Diagnostics.Debug.WriteLine("Hand: " + ToValue);
            }
        }