private bool needsScroll() { var currentTimePos = TimeScale.TimeToPosition(_timelineModel.CurrentTime, timelineView.Zoom); return(currentTimePos < timelineScroller.ContentHorizontalOffset || currentTimePos > timelineScroller.ViewportWidth + timelineScroller.ContentHorizontalOffset); }
private void scrollCurrentTimeIntoView() { var currentTimePos = TimeScale.TimeToPosition(_timelineModel.CurrentTime, timelineView.Zoom); timelineScroller.ScrollToHorizontalOffset(currentTimePos - 50); }