예제 #1
0
        private void UpdateCenter()
        {
            double num = TimelineView.PositionFromSeconds(this.timelineView.CurrentTime);

            this.wasCurrentTimeVisible = num >= this.ScrollBar.Value && num <= this.ScrollBar.Value + this.visibleWidth;
            this.centerTime            = TimelineView.SecondsFromPosition(this.ScrollBar.Value + this.visibleWidth / 2.0);
        }
예제 #2
0
        private void UpdateScrollExtents(bool isZooming)
        {
            ScrollViewer      scrollViewer      = (ScrollViewer)this.Viewers[0];
            ExtendedScrollBar extendedScrollBar = (ExtendedScrollBar)this.ScrollBar;
            double            num1 = TimelineView.PositionFromSeconds(Math.Max(this.timelineView.LastSignificantTime, TimelineView.SecondsFromPosition(scrollViewer.RenderSize.Width)) + 1.0) - scrollViewer.RenderSize.Width;

            if (isZooming)
            {
                if (this.wasCurrentTimeVisible)
                {
                    this.centerTime = this.timelineView.CurrentTime;
                }
                double num2 = Math.Max(0.0, TimelineView.PositionFromSeconds(this.centerTime) - this.visibleWidth / 2.0);
                extendedScrollBar.ContentMaximum = num1;
                extendedScrollBar.Value          = num2;
            }
            else
            {
                extendedScrollBar.ContentMaximum = num1;
            }
        }
예제 #3
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return((object)TimelineView.PositionFromSeconds((double)value));
 }