/// <summary> /// Scrolls the area control into position /// </summary> protected override void OnCursorMoved() { if (ElementContainer != null) { double lineHeight = ElementCursor.ActualHeight * _zoom; double cursorY = (double)ElementCursor.GetValue(Canvas.TopProperty) * _zoom; double lineWidth = 2 * _zoom; double cursorX = (double)ElementCursor.GetValue(Canvas.LeftProperty) * _zoom; ElementContainer.UpdateLayout(); ScrollIntoPosition(cursorX, cursorY, lineWidth, lineHeight); } }