# C1.WPF.C1DragDropManager.DoDragDrop

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_WPF_C1DragDropManager_DoDragDrop_" data-uid="C1.WPF.C1DragDropManager.DoDragDrop*">DoDragDrop Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_WPF_C1DragDropManager_DoDragDrop_" data-uid="C1.WPF.C1DragDropManager.DoDragDrop*"></a>
<h4 id="C1_WPF_C1DragDropManager_DoDragDrop_System_Windows_UIElement_System_Windows_Input_MouseEventArgs_C1_WPF_DragDropEffect_" data-uid="C1.WPF.C1DragDropManager.DoDragDrop(System.Windows.UIElement,System.Windows.Input.MouseEventArgs,C1.WPF.DragDropEffect)">DoDragDrop(UIElement, MouseEventArgs, DragDropEffect)</h4>
<div class="markdown level1 summary"><p>Initiates a drag drop operation using a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a> as a source, supporting a specified <a class="xref" href="C1.WPF.DragDropEffect.html">DragDropEffect</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DoDragDrop(UIElement source, MouseEventArgs e, DragDropEffect effect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DoDragDrop(source As UIElement, e As MouseEventArgs, effect As DragDropEffect)</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">source</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a> that will be dragged.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.mouseeventargs">MouseEventArgs</a></td>
      <td><span class="parametername">e</span></td>
      <td><p><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.mouseeventargs">MouseEventArgs</a> that contains the mouse position when the drag operation starts.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.WPF.DragDropEffect.html">DragDropEffect</a></td>
      <td><span class="parametername">effect</span></td>
      <td><p><a class="xref" href="C1.WPF.DragDropEffect.html">DragDropEffect</a> supported by the operation.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_C1DragDropManager_DoDragDrop_System_Windows_UIElement_System_Windows_Input_MouseEventArgs_C1_WPF_DragDropEffect__remarks">Remarks</h5>
<div class="markdown level1 remarks"><pre><code>&lt;p&gt;The &lt;code class=&quot;paramref&quot;&gt;e&lt;/code&gt; is not strictly required, but is usually available since drag drop operations 
</code></pre>
<p>are initiated by mouse actions. If you don't have a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.mouseeventargs">MouseEventArgs</a> to provide, pass <b>null</b>
instead.</p>
<p>The method causes the drag operation to start, then returns immediately. The caller is responsible for
monitoring and completing the operation using the <a class="xref" href="C1.WPF.C1DragDropManager.DragStart.html">DragStart</a>, <a class="xref" href="C1.WPF.C1DragDropManager.DragEnter.html">DragEnter</a>,
<a class="xref" href="C1.WPF.C1DragDropManager.DragOver.html">DragOver</a>, and <a class="xref" href="C1.WPF.C1DragDropManager.DragDrop.html">DragDrop</a> events.</p>
</div>
</div>
