Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic image flickering and size changes. (Read 3100 times)
Yogendra
Junior Member
**
Offline


I Love MindFusion!

Posts: 68
Joined: Dec 27th, 2012
image flickering and size changes.
May 2nd, 2013 at 6:14am
Print Post  
Hi Stoyo,

I am working with diagram. i can set image in backgroud of diagram. I have combo box in which there are four option. I can set image as None, Fill, Uniform and Uniform To Fill and also have 6 alignment radio button by whcih i can set image alignment as Left, Right, Top, Bottom, Center, Middle. When I set Uniform To Fill and set alignment by using radio button then Image gets cut. i have attached sample project which help you find the issue.

Step to reproduce:-

1. Add image on click on Add Image Button.

Note:- Image resolution should be 255 * 255 (sample image added in the Lib folder present under the Silverlight project)

2. Set Uniform to Fill By combo box.

3. set alignment.

4. Move your mouse cursor here & there (in and out diagram bound). You will see image flickering and size changes.

Please suggest me something...

Thanks in advanced. Smiley
  

DiagramImageAlignment.rar (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: image flickering and size changes.
Reply #1 - May 2nd, 2013 at 11:00am
Print Post  
It will work if you also clear the horizontal/vertical image aligment properties, which sets them to their default Stretch value:

Code
Select All
BGNode.ClearValue(ShapeNode.VerticalImageAlignmentProperty)
BGNode.ClearValue(ShapeNode.HorizontalImageAlignmentProperty) 



You'd better set ImageAlign though, the rest of them are implementaiton properties exposed as public only to allow binding from the Xaml template. When you assign to ImageAlign, it actually sets various combinations of ImageStretch, VerticalImageAlignment and HorizontalImageAlignment. If the Alignment properties are not set to Stretch, the <Image> control in the template will not cover the whole node, while ImageStretch only stretches relatively to the <Image> area.

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