# GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout*">AutoLayout Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout*"></a>
<h4 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_GrapeCity_Drawing_Rectangle_GrapeCity_Drawing_Rectangle_System_Boolean_System_Boolean_System_Boolean_System_Boolean_GrapeCity_Spreadsheet_IWorksheet_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout(GrapeCity.Drawing.Rectangle,GrapeCity.Drawing.Rectangle,System.Boolean,System.Boolean,System.Boolean,System.Boolean,GrapeCity.Spreadsheet.IWorksheet)">AutoLayout(Rectangle, Rectangle, bool, bool, bool, bool, IWorksheet)</h4>
<div class="markdown level1 summary"><p>Layouts the connection shape.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AutoLayout(Rectangle firstBounds, Rectangle secondBounds, bool updateAdjustments, bool updateParentBoundary = true, bool applyDisplayFormulas = false, bool updateBoundary = true, IWorksheet contextWorksheet = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AutoLayout(firstBounds As Rectangle, secondBounds As Rectangle, updateAdjustments As Boolean, Optional updateParentBoundary As Boolean = True, Optional applyDisplayFormulas As Boolean = False, Optional updateBoundary As Boolean = True, Optional contextWorksheet As IWorksheet = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Rectangle</span></td>
      <td><span class="parametername">firstBounds</span></td>
      <td><p>The first bound.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rectangle</span></td>
      <td><span class="parametername">secondBounds</span></td>
      <td><p>The second bound.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateAdjustments</span></td>
      <td><p>Update the adjustment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateParentBoundary</span></td>
      <td><p>Update parent boundary</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">applyDisplayFormulas</span></td>
      <td><p>Apply display formula.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateBoundary</span></td>
      <td><p>Update boundary</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.IWorksheet.html">IWorksheet</a></td>
      <td><span class="parametername">contextWorksheet</span></td>
      <td><p>A context worksheet</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout*"></a>
<h4 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_GrapeCity_Drawing_Rectangle_GrapeCity_Drawing_Rectangle_GrapeCity_Drawing_Point_GrapeCity_Drawing_Point_System_Boolean_System_Boolean_System_Boolean_System_Boolean_GrapeCity_Spreadsheet_IWorksheet_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout(GrapeCity.Drawing.Rectangle,GrapeCity.Drawing.Rectangle,GrapeCity.Drawing.Point,GrapeCity.Drawing.Point,System.Boolean,System.Boolean,System.Boolean,System.Boolean,GrapeCity.Spreadsheet.IWorksheet)">AutoLayout(Rectangle, Rectangle, Point, Point, bool, bool, bool, bool, IWorksheet)</h4>
<div class="markdown level1 summary"><p>Layouts the connection shape automatically.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AutoLayout(Rectangle firstBounds, Rectangle secondBounds, Point startPoint, Point endPoint, bool updateAdjustments, bool updateParentBoundary = true, bool applyDisplayFormulas = false, bool updateBoundary = true, IWorksheet contextWorksheet = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AutoLayout(firstBounds As Rectangle, secondBounds As Rectangle, startPoint As Point, endPoint As Point, updateAdjustments As Boolean, Optional updateParentBoundary As Boolean = True, Optional applyDisplayFormulas As Boolean = False, Optional updateBoundary As Boolean = True, Optional contextWorksheet As IWorksheet = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Rectangle</span></td>
      <td><span class="parametername">firstBounds</span></td>
      <td><p>The first bound.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rectangle</span></td>
      <td><span class="parametername">secondBounds</span></td>
      <td><p>The second bound.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Point</span></td>
      <td><span class="parametername">startPoint</span></td>
      <td><p>The start point of the connection shape.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Point</span></td>
      <td><span class="parametername">endPoint</span></td>
      <td><p>The end point of the connection shape.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateAdjustments</span></td>
      <td><p>Update the adjustment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateParentBoundary</span></td>
      <td><p>Update parent boundary.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">applyDisplayFormulas</span></td>
      <td><p>Apply display formula.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateBoundary</span></td>
      <td><p>Update boundary</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.IWorksheet.html">IWorksheet</a></td>
      <td><span class="parametername">contextWorksheet</span></td>
      <td><p>A context worksheet</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout*"></a>
<h4 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_GrapeCity_Drawing_Point_GrapeCity_Drawing_Point_System_Boolean_System_Boolean_GrapeCity_Spreadsheet_IWorksheet_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout(GrapeCity.Drawing.Point,GrapeCity.Drawing.Point,System.Boolean,System.Boolean,GrapeCity.Spreadsheet.IWorksheet)">AutoLayout(Point, Point, bool, bool, IWorksheet)</h4>
<div class="markdown level1 summary"><p>Layouts the connection shape to fit 2 specified points.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AutoLayout(Point startPoint, Point endPoint, bool updateParentBoundary = true, bool applyDisplayFormulas = false, IWorksheet contextWorksheet = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AutoLayout(startPoint As Point, endPoint As Point, Optional updateParentBoundary As Boolean = True, Optional applyDisplayFormulas As Boolean = False, Optional contextWorksheet As IWorksheet = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Point</span></td>
      <td><span class="parametername">startPoint</span></td>
      <td><p>The start point of the connection shape.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Point</span></td>
      <td><span class="parametername">endPoint</span></td>
      <td><p>The end point of the connection shape.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateParentBoundary</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">applyDisplayFormulas</span></td>
      <td><p>Apply display formula.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Spreadsheet.IWorksheet.html">IWorksheet</a></td>
      <td><span class="parametername">contextWorksheet</span></td>
      <td><p>a context worksheet.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout*"></a>
<h4 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_AutoLayout_System_Boolean_System_Boolean_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.AutoLayout(System.Boolean,System.Boolean)">AutoLayout(bool, bool)</h4>
<div class="markdown level1 summary"><p>The connection shape will layout automatically to fit with current connection sites.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AutoLayout(bool applyDisplayFormulas = false, bool updateBoundary = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AutoLayout(Optional applyDisplayFormulas As Boolean = False, Optional updateBoundary As Boolean = True)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">applyDisplayFormulas</span></td>
      <td><p>Apply display formula.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateBoundary</span></td>
      <td><p>Update boundary</p>
</td>
    </tr>
  </tbody>
</table>
</div>
