# C1.WinUI.Core.C1InputEventArgs.GetPosition

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WinUI_Core_C1InputEventArgs_GetPosition_" data-uid="C1.WinUI.Core.C1InputEventArgs.GetPosition*">GetPosition Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WinUI_Core_C1InputEventArgs_GetPosition_" data-uid="C1.WinUI.Core.C1InputEventArgs.GetPosition*"></a>
<h4 id="C1_WinUI_Core_C1InputEventArgs_GetPosition_Microsoft_UI_Xaml_FrameworkElement_" data-uid="C1.WinUI.Core.C1InputEventArgs.GetPosition(Microsoft.UI.Xaml.FrameworkElement)">GetPosition(FrameworkElement)</h4>
<div class="markdown level1 summary"><p>Gets the position of the pointer performing the drag gesture relatively to the specified element.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Point GetPosition(FrameworkElement relativeTo)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetPosition(relativeTo As FrameworkElement) As Point</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">FrameworkElement</span></td>
      <td><span class="parametername">relativeTo</span></td>
      <td><p>Any visual object that is connected to the same object tree. To specify the object relative to the overall coordinate system, use a relativeTo value of null.</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><span class="xref">Point</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="C1_WinUI_Core_C1InputEventArgs_GetPosition_" data-uid="C1.WinUI.Core.C1InputEventArgs.GetPosition*"></a>
<h4 id="C1_WinUI_Core_C1InputEventArgs_GetPosition_Microsoft_UI_Xaml_RoutedEventArgs_Microsoft_UI_Xaml_FrameworkElement_" data-uid="C1.WinUI.Core.C1InputEventArgs.GetPosition(Microsoft.UI.Xaml.RoutedEventArgs,Microsoft.UI.Xaml.FrameworkElement)">GetPosition(RoutedEventArgs, FrameworkElement)</h4>
<div class="markdown level1 summary"><p>Gets the position of the pointer or finger.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static Point GetPosition(RoutedEventArgs args, FrameworkElement relativeTo)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function GetPosition(args As RoutedEventArgs, relativeTo As FrameworkElement) As Point</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">RoutedEventArgs</span></td>
      <td><span class="parametername">args</span></td>
      <td><p>The <a class="xref" href="C1.WinUI.Core.C1InputEventArgs.OriginalEventArgs.html#C1_WinUI_Core_C1InputEventArgs_OriginalEventArgs">OriginalEventArgs</a> instance containing the manipulation data.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">FrameworkElement</span></td>
      <td><span class="parametername">relativeTo</span></td>
      <td><p>Any visual object that is connected to the same object tree. To specify the object relative to the overall coordinate system, use a relativeTo value of null.</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><span class="xref">Point</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
