title: Clickable control inside draggable control
body: <p>I have a draggable control (A), within it is a button.  There are also other controls within A, i.e. the button does not fill A.</p>
  
  <p>In order to manage the drag functionality, the control (A) captures any <code>MouseDown</code> events.  It later decides whether to start a drag based on how far the mouse has moved.</p>
  
  <p>If the button was clicked, and then a <code>MouseUp</code> event is received before a drag has been started, I'd like the button's <code>Click</code> event to fire.</p>
  
  <p>At the moment, this doesn't happen because the <code>MouseUp</code> event is captured by the parent control (A).  I could implement functionality on A to manually handle this:</p>
  
  <pre><code>private void MouseUp(object sender, MouseEventArgs e) {
      if (DragHasStarted) {
          DealWithDrag();
      }
      else {
          DelegateToChildControls();
      }
  }
  </code></pre>
  
  <p>However that's complicated and doesn't scale well since <code>DelegateToChildControls</code> needs to work out which child to delegate to.</p>
  
  <p>Is there a way to let Windows deal with this and call the button's Click method directly if the parent control doesn't handle the <code>MouseUp</code> event?</p>
  
  <p><strong>Edit - More detail on event sequence:</strong></p>
  
  <p>I see the following sequence of events when the button is clicked:</p>
  
  <ol>
  <li><code>MouseDown</code> on Button</li>
  <li><code>MouseDown</code> on Button (Drag handler)</li>
  <li>I forward this to parent of button</li>
  <li><code>MouseDown</code> on parent (Drag handler)</li>
  <li>Mouse Captured by parent (Drag handler)</li>
  <li><code>MouseUp</code> on parent</li>
  <li>End drag (drag handler)</li>
  </ol>
  
  <p>I never see a <code>MouseUp</code> event on the button.</p>