This project is read-only.

ZoomCanvas limiting min and max scale


For the ZoomCanvas, you can make a custom IZoomCanvasInputAdapter. Start out by copying the ZoomCanvasInputAdapterTouch.cs.
Notice in RegisterZoomCanvas you are given reference to the ZoomCanvas. You can save this reference and then in the manipulation events, check the scale, center, or rotation and modify the manipulation delta values you send to the ManipulationDelta event. For example, if the current scale plus the delta scale would go past your threshold, set the delta scale to 0.
You can also use the SetState event to make the ZoomCanvas go to a specific state.
This is a little bit hacky but will get you started right now. I'll add optional limits for scale, center, and rotation to the list of features to work on.