Zoom to Shape

2 posts, 0 answers
  1. Vivek
    Vivek avatar
    7 posts
    Member since:
    Apr 2013

    Posted 23 May 2013 Link to this post

    Hi,
    Is it possible to center and zoom in the diagram to a particular shape?

    I've been trying to use a shape's Position as a parameter in the Diagram's ZoomIn() function, but it's not working as expected. When I first zoom to a shape, that shape is correctly centered in view. Subsequent zooms to other shapes don't work as well - the view is completely off. I guess ZoomIn() doesn't use the same coordinate system as Diagram Shapes, so the Position is something different at different zoom levels.

    Maybe there's a "FocusOnShape()" function that I haven't yet found?
  2. Vivek
    Vivek avatar
    7 posts
    Member since:
    Apr 2013

    Posted 23 May 2013 Link to this post

    Nevermind. The FitTo() function does exactly what I need.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top