Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram Background image is cut when diagram bounds is changed. (Read 4529 times)
Yogendra
Junior Member
**
Offline


I Love MindFusion!

Posts: 68
Joined: Dec 27th, 2012
Diagram Background image is cut when diagram bounds is changed.
Jan 21st, 2013 at 11:08am
Print Post  
I am working with mindfussion.Diagrammming diagram. i can insert image in diagram background with using code:-
Dim WithEvents BGNode As MindFusion.Diagramming.Silverlight.ContainerNode
'this code for set Template background image
Dim shape As ShapeNode = BGNode
shape.Image = bitmap 'here set Template background image
Image size is 255 * 255
i can also changed diagram bounds with numeric updown button that is it increase or decrease diagram width. here is code:-

BGBounds = New Rect(spnTemplateLeft.Value, spnTemplateTop.Value, TemplateWidth, TemplateHeight)
diagram.Bounds = BGBounds
BGNode.Bounds = BGBounds


when value decrease from numeric up down button then is cut the image.
same problem with height numeric up down button.

Thanks in advance. Sad
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram Background image is cut when diagram bounds is changed.
Reply #1 - Jan 21st, 2013 at 2:40pm
Print Post  
Set the background node's ImageAlign property to Stretch or Fit. Values such as TopLeft draw the image in its native size and it will be cut if larger than the diagram. Also make sure you are using the ImageAlign enumeration, not the Silverlight's Stretch enum:
http://mindfusion.eu/Forum/YaBB.pl?num=1356619223

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