This guide covers the knobs that make ZoomBorder feel predictable in real applications.
BoundsMode controls how the viewport is constrained:
UnrestrictedKeepContentVisibleFillViewportKeepCenteredCustomAdditional supporting properties:
BoundsPaddingMinimumVisibleContentPercentageEnableConstrainsUse Custom only if you plan to override GetContentBounds() or ValidateTransform(...).
Wheel input is configurable instead of being hard-coded:
zoomBorder.WheelBehavior = WheelBehaviorMode.Zoom;
zoomBorder.WheelWithCtrl = WheelBehaviorMode.Zoom;
zoomBorder.WheelWithShift = WheelBehaviorMode.PanHorizontal;
zoomBorder.WheelZoomSensitivity = 1.0;
zoomBorder.WheelPanSensitivity = 1.0;
This is useful when a surface needs horizontal scrolling, precision zoom, or different modifier semantics.
Resize handling is controlled by ResizeBehavior:
NoneMaintainCenterMaintainTopLeftMaintainZoomReapplyStretchCustomChoose ReapplyStretch when the control should behave like a viewer that always re-fits content after host layout changes.
Auto-calculated zoom limits are available through:
AutoCalculateMinZoomAutoCalculateMaxZoomMaxZoomPixelSizeThat keeps very small or very large content usable without manually tuning MinZoomX, MaxZoomX, MinZoomY, and MaxZoomY for every surface.