If the built-in behavior is close but not exact, ZoomBorder exposes virtual hooks for custom policy.
GetContentBounds(): return the effective content bounds used for custom constraintsValidateTransform(Matrix newMatrix): veto proposed transformsOnResized(Size oldSize, Size newSize): apply custom resize policyExample:
public class CustomZoomBorder : ZoomBorder
{
protected override Rect GetContentBounds() => base.GetContentBounds();
protected override bool ValidateTransform(Matrix newMatrix)
{
return base.ValidateTransform(newMatrix);
}
protected override void OnResized(Size oldSize, Size newSize)
{
base.OnResized(oldSize, newSize);
}
}
Rotation state is configurable, but advanced rotation-heavy surfaces should validate how rotation interacts with bounds, serialization, and any custom overlay math before relying on it as a full scene-graph feature.