This project is read-only.

ZoomControl- limit pan to container

Jul 24, 2011 at 8:49 AM


ZoomControl works great. One thing I'd like to do, is limit panning so that the control will not go totally out of view. Currently it is contained in a grid inside a UserControl. The User control is in a grid under the main page. Now when I use pan, with any zoom applied, I can take the control far to any direction until it disappears.

Any help is appreciated.


Aug 1, 2011 at 8:41 AM

You need to modify the code. You should limit the translateX and translateY properties, but it is really easy to do with dependency property coercing: