Yes i use daigram nodeadapter., example:
var bshape = new BlackShape();
var node = new DiagramNodeAdapter(form, bshape);
node.Bounds = new Rect(e.MousePosition, new Size(100, 100));
form.Nodes.Add(node);
node.Constraints.MinWidth = 100;
node.Constraints.MinHeight = 100;
node.HandlesStyle = HandlesStyle.Custom;
node.Selected = true;
I try using
node.SizeSyncMode = SizeSyncMode.Measure;
or
node.SizeSyncMode = SizeSyncMode.Arrange;
or
node.SizeSyncMode = SizeSyncMode.SetSize;
What im trying is correct?
This is the only one problem i need fix for star use containers, i try this and not work.
Also more problems come, your example code no is usefull.
I first place, event no is fired only is fired, only is fired if use c.Foldable = true;
If is set to false, not work due event never is fired., im talking of this:
private void form_ContainerUnfolded(object sender, NodeEventArgs e)
{
Rect nodeRect = e.Node.Bounds;
Rect diagRect = form.Bounds;
if (nodeRect.Bottom > diagRect.Bottom)
e.Node.Move(nodeRect.X, diagRect.Bottom - nodeRect.Height);
}
Also, tis solution is useless, for simple reason, when i locate container close to the border, and open, the container move from the postion, the problem is when you fold again , the container should remain in orignal position (caption header), but that not happen due this solution just move the continer but never return to original position where is located.
Container should reamin in same position.
Thank you so much for your help Stoyo, but this not work.
Container really need some rework for make better how work right now.