# C1.WPF.Tile.C1TileService.SetPreservePointerCapture

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_Tile_C1TileService_SetPreservePointerCapture_" data-uid="C1.WPF.Tile.C1TileService.SetPreservePointerCapture*">SetPreservePointerCapture Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_Tile_C1TileService_SetPreservePointerCapture_" data-uid="C1.WPF.Tile.C1TileService.SetPreservePointerCapture*"></a>
<h4 id="C1_WPF_Tile_C1TileService_SetPreservePointerCapture_System_Windows_FrameworkElement_System_Boolean_" data-uid="C1.WPF.Tile.C1TileService.SetPreservePointerCapture(System.Windows.FrameworkElement,System.Boolean)">SetPreservePointerCapture(FrameworkElement, bool)</h4>
<div class="markdown level1 summary"><p>Sets the PreservePointerCapture attached property value on 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 static void SetPreservePointerCapture(FrameworkElement obj, bool value)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub SetPreservePointerCapture(obj As FrameworkElement, value 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.windows.frameworkelement">FrameworkElement</a></td>
      <td><span class="parametername">obj</span></td>
      <td><p>The element from which to read the property value.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">value</span></td>
      <td><p>The property value to set.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_Tile_C1TileService_SetPreservePointerCapture_System_Windows_FrameworkElement_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This property notifies the <a class="xref" href="C1.WPF.Tile.C1TileService.html">C1TileService</a>, that it should not release pointer capture for the element.
Set this property to true in the Control.OnPointerMoved override if the element needs pointer capture for some own functionality (for example, for dragging).</p>
</div>
</div>
