title: Dynamic Border configuration in WPF
body: <p>I am using drag and drop functionality in an application and I need to change the look of a Grid based on the location of the drag point.</p>
  
  <p>For example, I would like to be able to call something like the following that would change the border to only show the bottom, or the top,etc. This example would be that when there is a drag operation performed over Grid, the top border of the grid would be the only one set to a thickness of 5 and would be black.</p>
  
  <pre><code>private void Grid_DragOver(object sender,DragEventArgs e)
  {
          Grid grid = (Grid)sender;
          Border border = new Border();
          border.BorderBrush = Brushes.Black;
          border.BorderThickness = new Thickness(0,5,0,0);
          border.Child = grid;
  }
  </code></pre>