Remove Focus from TextBox by Clicking Anywhere/Anything Else
<p>Is there a direct way to de-focus a <code>TextBox</code> when clicking absolutely anywhere else in the form, whether or not the clicked thing itself can receive focus (e.g. toolbar buttons, toolbar and/or client area empty space, etc)?  That is to say, the de-focusing click event could occur on a variety of other controls that know nothing about the focused control.</p>

<p>This question is rather similar to <a href="https://stackoverflow.com/questions/5613913/remove-focus-if-clicked-anywhere-else">this one</a> and <a href="https://stackoverflow.com/questions/1140250/how-to-remove-the-focus-from-a-textbox-in-winforms">this one</a>, but the answers there are incomplete in that they don't offer any advice on when to perform the action (i.e. what event on what control).</p>

<p>I have a form (a <code>UserControl</code> subclass) with draggable widgets on a panel along with a couple of toolbars.  The draggable widgets are made up of <code>PictureBox</code>es and <code>Label</code>s.  Double-clicking on a widget's label replaces the label with a <code>TextBox</code> to allow the user to rename the component.  The intent is to force focus to leave the <code>TextBox</code> when clicking <em>anywhere</em> else, to cause validation to occur (as if the user had pressed Enter).  </p>

<p>Here's a quick rundown of the heirarchy:</p>

<pre>
UserControl
  +- ToolStripContainer
     +- ToolStripConainer.TopToolStripPanel
     |  +- ToolStrip
     +- ToolStripContainer.RightToolStripPanel
     |  +- ToolStrip
     +- ToolStripContainer.ContentPanel
        +- CompositorPanel (subclass of Panel to provide proper transparency)
           +- UserControl (draggable widget)
              +- PictureBox
              +- Label
              +- TextBox
</pre>

<p>I can add event handlers to various other components on the form to force the focused TextBox to un-focus (i.e. programmatically move the focus to another element), but that seems kludgy and requires unrelated elements to be aware of the currently-focused TextBox.  </p>

<p>I tried overriding <code>OnMouseDown</code> on the outermost class (the containing <code>UserControl</code> for everything, based on an idea presented <a href="https://stackoverflow.com/questions/6489032/wpf-remove-focus-when-clicking-outside-of-a-textbox">here</a>) but the method was never called.</p>