ZoomBorder implements ILogicalScrollable so it can participate in Avalonia scrolling infrastructure instead of fighting it.
Embedding zoomable content inside a ScrollViewer is common, but naive implementations can create feedback loops between viewport transforms and host scroll offsets.
ZoomBorder addresses that through:
ILogicalScrollable implementation in ZoomBorder.ILogicalScrollable.csCalculateScrollable(...) for computing extent, viewport, and offset from source bounds and the active matrixScrollViewer around the control only when you want scrollbars or host-level scrolling semantics.Avalonia.Controls.PanAndZoom.ZoomBorder.CalculateScrollable(Avalonia.Rect,Avalonia.Size,Avalonia.Media.Transformation.Matrix,Avalonia.Size@,Avalonia.Size@,Avalonia.Vector@)BringIntoView(...) behavior through the scrollable contract