title: Selectable controls in WPF
body: <p>Is there a <strong>general</strong> mechanism in WPF that allows for any or almost any control to be selected? For instance, you could have some <em><code>Image</code></em> controls on a <em><code>WrapPanel</code></em> defined in XAML, and you need to be able to select them either one by one, or by dragging over with the mouse to mark multiple.</p>
  
  <p>In terms of code, I can imagine the following:</p>
  
  <pre><code>&lt;WrapPanel&gt; 
      &lt;Image Source="{StaticResource ResourceKey=pic1}" /&gt;
      &lt;Image Source="{StaticResource ResourceKey=pic2}" /&gt;
      &lt;Image Source="{StaticResource ResourceKey=pic3}" /&gt;
      &lt;Image Source="{StaticResource ResourceKey=pic4}" /&gt;
      &lt;Image Source="{StaticResource ResourceKey=pic5}" /&gt;
  &lt;/WrapPanel&gt;
  </code></pre>