title: Manually drawing at coordinates inside a wrap panel
body: <p>In my application I have several(!) (wrap) panels which contains small thumbnails (<code>Image</code>) (Thumbnails are generated on the fly, so no xaml). I wish to show which thumbnail I "select" by drawing a "glowing" border over it.</p>
  
  <p>To do this I went and wrote a "<code>selectElement</code>" function:</p>
  
  <pre><code>private void SelectElement(FrameworkElement elem)
  {
      if (elem == _selectedElement) return;
      _selectedElement = elem;
      var parentPanel = _selectionBorder?.Parent as Panel;
      if (parentPanel != null)
      {
          parentPanel.Children.Remove(_selectionBorder);
      }
      _selectionBorder = null;
      if (_selectedElement == null) return;
      _selectionBorder = new Border
      {
          BorderThickness = new Thickness(10),
          BorderBrush = Brushes.Black
      };
  
      var p = _selectedElement.Parent as Panel;
      if (p == null) return;
      p.Children.Add(_selectionBorder);
      var m = _selectedElement.Margin;
      _selectionBorder.Margin = m;
  }
  </code></pre>
  
  <p>Which will be called from a <code>MouseDown</code> event for the <code>Image</code>;
  Now the problem is: Even though I set the margin for the border to the same as the element, the border is added after all elements. Is it possible to "bypass" the default wrappanel behaviour for this border? - Or is it possible to actually draw a "border around my thumbnail <code>Image</code>"? - Without actually increasing the image's size (The "semitransparent border" should blend with the image to the sides).</p>
  
  <p>PS: Yes I realize that this would mean the border is "cut" when the thumbnail is close to the wrappanel's border itself but I'm ok with that.</p>