# C1.WPF.C1DragDropManager.RegisterDropTarget

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_C1DragDropManager_RegisterDropTarget_" data-uid="C1.WPF.C1DragDropManager.RegisterDropTarget*">RegisterDropTarget Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_C1DragDropManager_RegisterDropTarget_" data-uid="C1.WPF.C1DragDropManager.RegisterDropTarget*"></a>
<h4 id="C1_WPF_C1DragDropManager_RegisterDropTarget_System_Windows_UIElement_System_Boolean_" data-uid="C1.WPF.C1DragDropManager.RegisterDropTarget(System.Windows.UIElement,System.Boolean)">RegisterDropTarget(UIElement, bool)</h4>
<div class="markdown level1 summary"><p>Registers (or unregisters) an element as a drop target.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void RegisterDropTarget(UIElement target, bool register)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub RegisterDropTarget(target As UIElement, register 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.uielement">UIElement</a></td>
      <td><span class="parametername">target</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a> that will act as a drop target.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">register</span></td>
      <td><p><b>True</b> to register the element, <b>false</b> to unregister.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_C1DragDropManager_RegisterDropTarget_System_Windows_UIElement_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The <code class="paramref">target</code> element should not be transparent, or it will
not receive any mouse events and thus won't be able to act as a drop target.</p>
</div>
</div>
