Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram canvas area is not updated. (Read 5619 times)
Yogendra
Junior Member
**
Offline


I Love MindFusion!

Posts: 68
Joined: Dec 27th, 2012
Diagram canvas area is not updated.
Dec 29th, 2012 at 11:04am
Print Post  
I am working with diagram. I create one Template using this code

[color=#00ffff] TemplateWidth=1024
TemplateHeight=768
BGBounds = New Rect(0, 0, TemplateWidth, TemplateHeight)
BGNode = diagram.Factory.CreateContainerNode(BGBounds)
With diagram
.AutoResize = AutoResize.None
.Behavior = Behavior.Modify
.AlignToGrid = True
'.GridColor = Colors.Black
.AutoScroll = True
.MeasureUnit = MindFusion.Diagramming.Silverlight.GraphicsUnit.Pixel
.AdjustmentHandlesSize = 10
.ShapeBrush = NodeBrush

.Width = TemplateWidth
.Height = TemplateHeight
.DocumentPlane.Width = TemplateWidth
.DocumentPlane.Height = TemplateHeight
'.DocumentPlane.Width = TemplateWidth - 30
'.DocumentPlane.Height = TemplateHeight + 30
.ShowGrid = True

End With
[/color]
This code show canvas area. When i change Diagram width and height so canvas area is not updated. and also diagram node is not moved after 1024*768 resolution. Please help me. i have attach image which will help.

thank in advance Sad
  

Diagram_002.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram canvas area is not updated.
Reply #1 - Dec 31st, 2012 at 8:46am
Print Post  
You should set diagram.Bounds = New Rect(0, 0, TemplateWidth, TemplateHeight) instead of setting Width and Height directly. Assigning to Bounds will implicitly set Width and Height converted from current measure unit, and also resize various internal layers, such as the grid layer, which are otherwise not updated if you set only Width/Height. The Bounds setter also lets you define coordinate system origin different from 0,0.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint