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.
Unfortunately, activation email could not send to your email. Please try again.

Layout Manager Padding, Margin?

Thread ID:





90529 Oct 6,2009 02:53 PM Nov 2,2009 09:11 AM ASP.NET Web Forms (Classic) 1
Tags: DiagramWebControl
Mike Graves
Asked On October 6, 2009 02:53 PM

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.

Dinesh M [Syncfusion]
Replied On November 2, 2009 09:11 AM

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);



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.