BringIntoView() and AutoFit()

6 posts, 0 answers
  1. Maite
    Maite avatar
    33 posts
    Member since:
    Mar 2014

    Posted 20 Oct 2014 Link to this post

    Hi, 

    This is my scenario: I have a Diagram and I do  Diagram.BringIntoView(new Point(0,0), zoom, false), but when I do Diagram.AutoFit(new Thickness(0, 0, 0, 0), false), my Diagram back to the original position (without zoom) as if the function BringIntoView() doesn't work. I need that the Diagram will be in center and with zoom. 

    Thanks, 

    Maite.
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 22 Oct 2014 Link to this post

    Hi,

    This is the designed and expected behavior of the AutoFit() method. By setting the Thickness parameter to 0 you actually define no Margin around the graph of your diagram. Thus defining default zoom. If you need to change the zoom of the diagram using the AutoFit() method you should define custom margin. 

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Maite
    Maite avatar
    33 posts
    Member since:
    Mar 2014

    Posted 22 Oct 2014 in reply to Pavel R. Pavlov Link to this post

    Hi, 

    This solution doesn't help me. AutoFit() with a thicnkess doesn't work. It doesn't do zoom.

    Maite.
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 24 Oct 2014 Link to this post

    Hi,

    That is not completely true. The RadDiagram zooms and pans the viewport so that shapes are visualized. The only scenario that the AutoFit() method will not do anything is when the Thickness is greater than the visible area of the diagram.

    Please take a look at the attached project to see the AutoFit() in action.

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Maite
    Maite avatar
    33 posts
    Member since:
    Mar 2014

    Posted 24 Oct 2014 in reply to Pavel R. Pavlov Link to this post

    Hello, 

    I'm so sorry. I did not explain well. I need to do expand zoom. I saw that AutoFit() does the zoom more little. If the Diagram is more bigger than the Grid, AutoFit() does zoom, but if the Diagram is more little than de Grid, the zoom doesn't work. 

    Thanks!

    Maite.
  7. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 28 Oct 2014 Link to this post

    Hi,

    Could you please be more specific and clarify what exactly you have in mind when you say "expand zoom"? Also, which Grid you refer to? 

    Regards,
    Pavel R. Pavlov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready