# C1.Android.Core.C1Rect.Offset

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Android_Core_C1Rect_Offset_" data-uid="C1.Android.Core.C1Rect.Offset*">Offset Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Android_Core_C1Rect_Offset_" data-uid="C1.Android.Core.C1Rect.Offset*"></a>
<h4 id="C1_Android_Core_C1Rect_Offset_System_Double_System_Double_" data-uid="C1.Android.Core.C1Rect.Offset(System.Double,System.Double)">Offset(double, double)</h4>
<div class="markdown level1 summary"><p>Moves the rectangle by the specified horizontal and vertical amounts.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Offset(double offsetX, double offsetY)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Offset(offsetX As Double, offsetY As Double)</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.double">double</a></td>
      <td><span class="parametername">offsetX</span></td>
      <td><p>The amount to move the rectangle horizontally.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">offsetY</span></td>
      <td><p>The amount to move the rectangle vertically.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></td>
      <td><p>This method is called on the <span class="xref">System.Windows.Rect.Empty</span> rectangle.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Android_Core_C1Rect_Offset_" data-uid="C1.Android.Core.C1Rect.Offset*"></a>
<h4 id="C1_Android_Core_C1Rect_Offset_C1_Android_Core_C1Rect_System_Double_System_Double_" data-uid="C1.Android.Core.C1Rect.Offset(C1.Android.Core.C1Rect,System.Double,System.Double)">Offset(C1Rect, double, double)</h4>
<div class="markdown level1 summary"><p>Returns a rectangle that is offset from the specified rectangle by using the specified horizontal and vertical amounts.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static C1Rect Offset(C1Rect rect, double offsetX, double offsetY)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function Offset(rect As C1Rect, offsetX As Double, offsetY As Double) As C1Rect</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="C1.Android.Core.C1Rect.html">C1Rect</a></td>
      <td><span class="parametername">rect</span></td>
      <td><p>The rectangle to move.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">offsetX</span></td>
      <td><p>The horizontal offset for the new rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">offsetY</span></td>
      <td><p>The vertical offset for the new rectangle.</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="C1.Android.Core.C1Rect.html">C1Rect</a></td>
      <td><p>The resulting rectangle.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></td>
      <td><p><code class="paramref">rect</code> is <span class="xref">System.Windows.Rect.Empty</span>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
