Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Inserting an Image into a ShapeNode (Read 1788 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Inserting an Image into a ShapeNode
Apr 8th, 2013 at 12:28pm
Print Post  
Hi,

I have several images (all the same size), that I would like to render within a simple rectangle ShapeNode.
It's probably a syntax issue, but here's my code.
All that I get is the rectangle; no image.
I've also tried just "Images/myShapeImages/User_Task.png" as the URL.

Suggestions?

Jim

Code
Select All
ShapeNode taskType = factory.CreateShapeNode(0, 0, 5, 5, Shapes.Rectangle);
        taskType.ImageUrl = "http://vs2010prodevjim/NavviaNewDev/Images/myShapeImages/User_Task.png";
        taskType.Tag = "taskType";
        taskType.IgnoreLayout = true;
        //taskType.Transparent = true;
        taskType.Move(node.Bounds.Left + 1, node.Bounds.Top + 1);
        taskType.AttachTo(node, AttachToNode.TopLeft); 

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Inserting an Image into a ShapeNode
Reply #1 - Apr 8th, 2013 at 1:54pm
Print Post  
Hi,

You will have to set the Image property, e.g. assign to it the result of Image.FromFile(). ImageUrl was added for Canvas mode, and we haven't implemented it yet for other modes.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: Inserting an Image into a ShapeNode
Reply #2 - Apr 8th, 2013 at 2:12pm
Print Post  
Hi,

Just what I needed Smiley
Thanks

Jim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint