|
Hi Stoyo,
Thank you very much for your help. Right now I am able to make custom node using the shape designer and have seen how to access it using Shape.FromId. However when I use it in the node list my code crashes. Here is what I am doing.
SHAPE CODE-
Shape test = new Shape( new ElementTemplate[] { new LineTemplate(30, 100, 100, 100), new LineTemplate(100, 100, 70, 0), new LineTemplate(70, 0, 0, 0), new LineTemplate(0, 0, 30, 100) }, new ElementTemplate[] { new LineTemplate(1, 3, 60, 60), new LineTemplate(59, 74, 80, 100) },null, FillRule.EvenOdd, "test");
I am calling it like this- public Window1() { InitializeComponent(); Shape test = new Shape( new ElementTemplate[] { new LineTemplate(30, 100, 100, 100), new LineTemplate(100, 100, 70, 0), new LineTemplate(70, 0, 0, 0), new LineTemplate(0, 0, 30, 100) }, new ElementTemplate[] { new LineTemplate(1, 3, 60, 60), new LineTemplate(59, 74, 80, 100) },null, FillRule.EvenOdd, "test"); nodeListView.Items.Add(Shape.Shapes.Equals(test.Id));
and XAML is-
<d:ShapeNode Shape="test" Bounds="2,2,25,25" Brush="DeepSkyBlue" d:NodeListView.Label="test" />
However this never shows up in my NodeList View and my application crash.
I would really appreciate if you can tell me what should i do to sort htis.
Thanks Charu
|