Hi Stoyan,
Thanks for the reply. Issue-2 is now solved.
We have tried your solution for Issue-1 (i.e. use either factory or AddNode) but still we are stuck on the same issue. If you select Node1 and Node2 and drag them to bottom side out of the visible area, you will see nodes get blank.
Please have a look in to this.
One another issue is of Window Clipping. When Expander button is clicked and if window is clipping from the screen border, window should move some left or up position and stay with the associated node.
I have written some logic for it, please have a look in to that and tell me what I am missing or what more should be added. Code lines for Window Clipping from right side is:
if ((popUp.Left + popUp.Width) > (diagram.Bounds.X + diagram.Bounds.Width))
{
Rect rc = new Rect(diagram.Bounds.X, diagram.Bounds.Y, diagram.Bounds.Width + popUp.Width, diagram.Bounds.Height);
diagram.Bounds = rc;
diagram.ScrollX = diagram.Bounds.Width + popUp.Width;
diagram.ScrollTo(new Point(diagram.Bounds.X + popUp.Width, diagram.Bounds.Y));
popUp.Left = popUp.Left - popUp.Width - 5;
popUp.Top = popUp.Top - 5;
}
I have again sent a sample to you. Please take this sample to see the problem.
Many thanks in advance,
Bala