void VerticalScrollBarMargin_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { if (Visibility == Visibility.Visible) { RegisterEvents(); UpdateMinMax(); LargeChange = scrollMap.ThumbSize; ViewportSize = scrollMap.ThumbSize; Value = scrollMap.GetCoordinateAtBufferPosition(FirstVisibleLinePoint); } else { UnregisterEvents(); } }
public double GetCoordinateAtBufferPosition(SnapshotPoint bufferPosition) { return(_scrollMap.GetCoordinateAtBufferPosition(bufferPosition)); }