title: Transparent border in WPF programmatically
body: <p>It's trivial to generate a border (to use for Trackball events) transparent over the viewport in the XAML file:</p>
  
  <pre><code>&lt;Border Name="myElement" Background="Transparent" /&gt;
  </code></pre>
  
  <p>But how do I do it in the .cs?</p>
  
  <pre><code>Border border = new Border();
  **border.Background = (VisualBrush)Colors.Transparent;**
  grid.Children.Add(viewport);
  grid.Children.Add(border);
  </code></pre>
  
  <p>This does not work of course.</p>