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


I Love MindFusion!

Posts: 41
Joined: Jun 27th, 2016
Diagram stretching
Aug 3rd, 2016 at 9:40am
Print Post  
Hello.

I have a diagram in my diagramView.
I am manipulating with this diagram through my viewModel.
How can I stretch this diagram to the bounds of the diagramView when I maximize my window.
I have tried HorizontalAllignment.Stretch but it wont work.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Diagram stretching
Reply #1 - Aug 3rd, 2016 at 10:24am
Print Post  
Hi,

The diagram does not support auto-stretch option but stays as big as its Bounds value. Try resizing the diagram from window's SizeChanged event -

Code
Select All
window.SizeChanged += (s, args) =>
{
	var r = myDiagram.Bounds;
	r.Width = Math.Max(r.Width, window.Width);
	r.Height = Math.Max(r.Height, window.Height);
	if (r != myDiagram.Bounds)
	{
		myDiagram.Bounds = r;
		myDiagram.ScrollTo(r.Location);
	}
}; 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint