I made a dll in which there is a Palette with 3 Node in it (all based on the Flowgrammer demo).
The first node in showin a NodeShape with go:NodePanle.Figure=“BpmnEventTimer”, the second and thrid are self drawn (on showing a Rectangle with a path in it and the other one a Control out of another Assembly).
Now the Problem, I wrote two demos using the dll and one final Application.
In the Demos the Palette ist showing all three Node, but in the Application the first Node with the Timersymbol is missing. There is and empty space where the timer should be and if I analyse with snoop I can find the correct Node, but it is not showing.
It’s all based on the Flowgrammer Democode.
There is no asyncronous modification. What’s really wierd is that the same control from the same directory is working in the other apps.
I assume “n.def” means Double.NaN – “Not a Number”.
OK, so it’s not showing because its Node.Location is (NaN, NaN). But I don’t understand what has caused it to either never receive a location (which is assigned by the GridLayout) or to lose it (which might be related to IsArrangeValid being false).
For debugging, I suppose you could set a breakpoint in a Diagram.InitialLayoutCompleted event handler on your Palette. Then you can check the values of Node.Location for that (and all Nodes) in the Palette.
Really? When I debug the unmodified Flowgrammer sample, the “If” node in the Palette has a Location of: + Location {16.95,25.96} System.Windows.Point
And the “Action 1” node has a Location of: + Location {16.95,25.96} System.Windows.Point
(And of course both nodes have their UIElement.IsArrangeValid property true.)
Is there any way you can help me reproduce this problem?
Do you have any code that touches your Palette after initializing its Model?
The go:Node.Location attached dependency property is only used on the main visual element of the Node. In this case it would be attached to the SpotPanel.
But the Node class also has a Location CLR property whose implementation just delegates to that attached property on the Part.VisualElement.
Location is of type Point, so it would not make sense for it to have four numbers.
That sounds like a reasonable expected location for the first node, so we know that the layout is working correctly.
So I am still mystified why IsArrangeValid is false in your app but not in your demo. Something is changing that first node without the diagram arranging that node again. Is there anything that you are willing to do to help me debug this? Or do you want to live with your work-around?