Thanks i will try this and let you know.
I have one more query
1) I have written following code for custom shape node:
[code] shapeNode = new MindFusion.Diagramming.Wpf.Shape(new ElementTemplate[]{ new LineTemplate(50, 0, 100, 50), new LineTemplate(100, 50, 50, 100), new LineTemplate(50, 100, 0, 50), new LineTemplate(0, 50, 50, 0), },null, new ElementTemplate[]{ new LineTemplate(0, 100, 100, 100), new LineTemplate(100, 100, 100, 150), new LineTemplate(100, 150, 0, 150), new LineTemplate(0, 150, 0, 100) }, FillRule.Nonzero, "");
ShapeNode node = new ShapeNode(diagram); node.Bounds = new Rect(new Point(100, 100), new Size(45, 45)); Uri uri = new Uri(@"..\..\Test.png", UriKind.RelativeOrAbsolute); node.Image = new BitmapImage(uri); node.ImageAlign = ImageAlign.Center; node.TextFormat.Alignment = StringAlignment.Center; node.Text = "Hello Test"; [/code]
The problem with above code is that the text attached to the node i.e. "Hello Test" is getting clipped and we see only "Hello". What we like here is that the text can be given of any length and the text region should adjust its width accordingly.
How to achieve this?
Thanks, Anurodh
|