Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram zooming (Read 1581 times)
monkeydll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 27th, 2016
Diagram zooming
Aug 22nd, 2016 at 12:17pm
Print Post  
Hello

How can I zoom my diagram while I change my window size.
When I Maximize my window the diagram should be bigger
and while minimizing the diagram should be smaller.
My diagram is in my diagramView, and manipulation is being done through my ViewModel.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Diagram zooming
Reply #1 - Aug 22nd, 2016 at 1:16pm
Print Post  
Hi,

Try this if you are using the Window class from MindFusion.UI -

Code
Select All
window.SizeChanged += (s, args) =>
{
	if (args.NewSize.Width > 0 && args.PreviousSize.Width > 0)
		view.ZoomFactor *= args.NewSize.Width / args.PreviousSize.Width;
}; 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
monkeydll
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 41
Joined: Jun 27th, 2016
Re: Diagram zooming
Reply #2 - Aug 22nd, 2016 at 1:40pm
Print Post  
Thank you very much
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint