Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Extend ShapeNode text outside of shape's bounds (Read 2682 times)
GregC
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jan 16th, 2014
Extend ShapeNode text outside of shape's bounds
Jan 16th, 2014 at 12:09pm
Print Post  
Hi,
I am using WPF Diagramming.  I have a ShapeNode and I would like to show some text above the shape.  To do this I set TextPadding = new System.Windows.Thickness(0, -15, 0, 0).   This works fine.
However, if the length of text is wider than the node, i would like it to just continue on one line, rather than wrap when it reaches the right edge of the shape.  I tried TextWrapping = NoWrap, but this just makes the text disappear completely.  I also tried many other things.
Any workaround to achieve what i need ?
I attached an image to better explain.
Thanks
Greg
  

example_003.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Extend ShapeNode text outside of shape's bounds
Reply #1 - Jan 16th, 2014 at 12:36pm
Print Post  
Hi,

By that logic you can also extend the horizontal text region using negative Left and Right members of TextPadding:

Code
Select All
var d = diagram.Factory.CreateShapeNode(110, 110, 50, 50);
d.TextPadding = new Thickness(-200000, -15, -200000, 0);
d.Text = "major major major major major major";
d.TextVerticalAlignment = AlignmentY.Top;
d.TextAlignment = TextAlignment.Center; 



That works fine in my test project.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
GregC
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 5
Joined: Jan 16th, 2014
Re: Extend ShapeNode text outside of shape's bounds
Reply #2 - Jan 16th, 2014 at 1:00pm
Print Post  
Hi,

That works, thanks for the tip !  Seems obvious now.

Best Regards
Greg
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint