We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Layout Manager Padding, Margin?

I am currently using a symmetric layout manager to arrange nodes. Is it possible to apply padding or margins to the layout? After the layout is complete the nodes are aligned top left.

1 Reply

DM Dinesh M Syncfusion Team November 2, 2009 02:11 PM UTC

Hi Mike,

The top and left margin can be achieved using the following code.

private void Form1_Load(object sender, EventArgs e)
{

SymmetricLayoutManager smtLayout = new SymmetricLayoutManager(this.diagram1.Model, DEF_LAYOUT_DISTANCE);
smtLayout.PreferredLayout += new PreferredLayoutEventHandler(smtLayout_PreferredLayout);
this.diagram1.LayoutManager = smtLayout;
}

void smtLayout_PreferredLayout(object sender, PreferredLayoutEventArgs evtArgs)
{
evtArgs.Location = new PointF(100, 100);
}

Regards,
Dinesh

Loader.
Live Chat Icon For mobile
Up arrow icon