# GrapeCity.Documents.Text.TextLayout.PerformLayout

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Text_TextLayout_PerformLayout_" data-uid="GrapeCity.Documents.Text.TextLayout.PerformLayout*">PerformLayout Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Text_TextLayout_PerformLayout_" data-uid="GrapeCity.Documents.Text.TextLayout.PerformLayout*"></a>
<h4 id="GrapeCity_Documents_Text_TextLayout_PerformLayout_System_Boolean_" data-uid="GrapeCity.Documents.Text.TextLayout.PerformLayout(System.Boolean)">PerformLayout(bool)</h4>
<div class="markdown level1 summary"><p>Determines the coordinates for all lines and glyph runs.
Optionally calls <a class="xref" href="GrapeCity.Documents.Text.TextLayout.RecalculateGlyphs.html#GrapeCity_Documents_Text_TextLayout_RecalculateGlyphs">RecalculateGlyphs()</a> prior to performing the layout.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool PerformLayout(bool recalculateGlyphsBeforeLayout = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function PerformLayout(Optional recalculateGlyphsBeforeLayout As Boolean = False) As Boolean</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">recalculateGlyphsBeforeLayout</span></td>
      <td><p>If true, <a class="xref" href="GrapeCity.Documents.Text.TextLayout.RecalculateGlyphs.html#GrapeCity_Documents_Text_TextLayout_RecalculateGlyphs">RecalculateGlyphs()</a> will be called before performing the layout.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</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><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the whole text fits in the bounds of <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a>,
<a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> if some text doesn't fit in bounds and one of the Split* methods must be executed
to move the rest of the text into another <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a> instance.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Documents_Text_TextLayout_PerformLayout_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>When all text and formatting have been specified on an instance of <a class="xref" href="GrapeCity.Documents.Text.TextLayout.html">TextLayout</a>,
<a class="xref" href="GrapeCity.Documents.Text.TextLayout.RecalculateGlyphs.html#GrapeCity_Documents_Text_TextLayout_RecalculateGlyphs">RecalculateGlyphs()</a> must be called on it to convert characters to glyphs.
After that, PerformLayout(false) can be called multiple times for different layout parameters (such as <a class="xref" href="GrapeCity.Documents.Text.TextLayout.MaxWidth.html#GrapeCity_Documents_Text_TextLayout_MaxWidth">MaxWidth</a> and <a class="xref" href="GrapeCity.Documents.Text.TextLayout.MaxHeight.html#GrapeCity_Documents_Text_TextLayout_MaxHeight">MaxHeight</a>
to create different layouts of the same text.When only a single layout for each text is needed,
the two calls can be shortened to just one PerformLayout(true) call for convenience.</p>
</div>
<h5 id="GrapeCity_Documents_Text_TextLayout_PerformLayout_System_Boolean__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="GrapeCity.Documents.Text.TextLayout.RecalculateGlyphs.html#GrapeCity_Documents_Text_TextLayout_RecalculateGlyphs">RecalculateGlyphs</a>()</div>
</div>
</div>
