Suppose I copied a sub-tree and pasted on another node. It got pasted. But the bounds it take as 0,0 so all the nodes and its children appear on top of each other.
To fix this, in my MyCustomPaste() function, I called the same function which telerik has called in mind map diagram demo for layout.
So my aim is to call any default layout so that nodes get realigned into appropriate position once the pasting of new nodes is done.
This layout works for the remaining of the nodes which have not been touched by my custom cut and copy function. But the rest of the children of the node which is copied, still come on top of each other. Any fix for this?
To fix this, in my MyCustomPaste() function, I called the same function which telerik has called in mind map diagram demo for layout.
So my aim is to call any default layout so that nodes get realigned into appropriate position once the pasting of new nodes is done.
settings.Roots.Add(
this
.diagram.ContainerGenerator.ContainerFromItem(
this
.maintViewModel.Source.Items.OfType<
object
>().ElementAt(0))
as
IShape);
this
.diagram.Layout(LayoutType.Tree, settings);
this
.diagram.AutoFit();
This layout works for the remaining of the nodes which have not been touched by my custom cut and copy function. But the rest of the children of the node which is copied, still come on top of each other. Any fix for this?