Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Not able to find ZoomToFit() method for diagram (Read 1862 times)
kaykay15
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 43
Joined: Mar 11th, 2010
Not able to find ZoomToFit() method for diagram
Apr 16th, 2010 at 6:16am
Print Post  
Hello,

While searching for zoom in forums i found ZoomToFit() method, but i am not able to find this method for the diagram, is that method updated or should i call any other method to fit the diagram to the available space.

Thanks,
-KayKay
« Last Edit: Apr 16th, 2010 at 7:50am by kaykay15 »  

Thanks,&&-KayKay
Back to top
 
IP Logged
 
kaykay15
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 43
Joined: Mar 11th, 2010
Re: Not able to find ZoomToFit() method for diagra
Reply #1 - Apr 16th, 2010 at 7:49am
Print Post  
Hey I found a workaround to implement zoomtofit method

this is working fine...

while (scrollViewer.ScrollableWidth != 0 || scrollViewer.ScrollableHeight != 0)
           {
               diagram.ZoomFactor -= 1;
               scrollViewer.UpdateLayout();
               if (diagram.ZoomFactor <= 1)
                   break;
           }

Thanks,
-KayKay
  

Thanks,&&-KayKay
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Not able to find ZoomToFit() method for diagra
Reply #2 - Apr 16th, 2010 at 8:09am
Print Post  
ZoomToFit is not available in the Silverlight control. You could try using the ZoomToRect method instead:

diagram.ZoomToRect(diagram.GetContentBounds(false, true));

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
kaykay15
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 43
Joined: Mar 11th, 2010
Re: Not able to find ZoomToFit() method for diagra
Reply #3 - Apr 16th, 2010 at 10:45am
Print Post  
That works... Thanks
  

Thanks,&&-KayKay
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint