title: Bind to a Name property of a grid WPF
body: <p>So I have my xaml:</p>
  
  <pre><code>&lt;Grid 
         Name="{x:Static enums:DropTargetNames.ItemsGridView}" /&gt;
  </code></pre>
  
  <p>So the <code>enums</code> is the namespace, the <code>DropTargetNames</code> is a static class and the <code>MasterProgramGridView</code> is a static string. The idea being to prevent mistypes when coding, because these get used in multiple places.</p>
  
  <p>Unforatunately c# WPF doesn't allow this. So is there another property I can set like this to use as an identifier for the grid?</p>
  
  <p>My code identifying the grid is this:</p>
  
  <pre><code>var grid = dropInfo.Target as Grid;
  var name = grid.Name;
  
  switch (name) {
  
  }
  </code></pre>
  
  <p>In the switch you use the <code>DropTargetNames.ItemsGridView</code> or other static strings.</p>