# C1.C1Preview.ImageAlign.BestFit

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Preview_ImageAlign_BestFit_" data-uid="C1.C1Preview.ImageAlign.BestFit*">BestFit Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Preview_ImageAlign_BestFit_" data-uid="C1.C1Preview.ImageAlign.BestFit*"></a>
<h4 id="C1_C1Preview_ImageAlign_BestFit" data-uid="C1.C1Preview.ImageAlign.BestFit">BestFit</h4>
<div class="markdown level1 summary"><p>Gets or sets a value indicating whether an image should be resized to best fit within its container.
See <b>remarks</b> for details.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool BestFit { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Property BestFit As Boolean</code></pre>
</div>
<h5 id="C1_C1Preview_ImageAlign_BestFit_remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;
</code></pre>
<p>Getting this property returns a Boolean conjunction (<b>AND</b>) of the
<a class="xref" href="C1.C1Preview.ImageAlign.StretchHorz.html#C1_C1Preview_ImageAlign_StretchHorz">StretchHorz</a>, <a class="xref" href="C1.C1Preview.ImageAlign.StretchVert.html#C1_C1Preview_ImageAlign_StretchVert">StretchVert</a> and <a class="xref" href="C1.C1Preview.ImageAlign.KeepAspectRatio.html#C1_C1Preview_ImageAlign_KeepAspectRatio">KeepAspectRatio</a> values.</p>

    <p>
Setting this property to a <b>true</b> value sets
<a class="xref" href="C1.C1Preview.ImageAlign.StretchHorz.html#C1_C1Preview_ImageAlign_StretchHorz">StretchHorz</a>, <a class="xref" href="C1.C1Preview.ImageAlign.StretchVert.html#C1_C1Preview_ImageAlign_StretchVert">StretchVert</a> and <a class="xref" href="C1.C1Preview.ImageAlign.KeepAspectRatio.html#C1_C1Preview_ImageAlign_KeepAspectRatio">KeepAspectRatio</a> to <b>true</b>.
</p>
    <p>
Setting this property to a <b>false</b> value sets
<a class="xref" href="C1.C1Preview.ImageAlign.KeepAspectRatio.html#C1_C1Preview_ImageAlign_KeepAspectRatio">KeepAspectRatio</a> only to <b>false</b>.
</p>
</div>
</div>
