title: Ambiguous reference advice
body: <p>The following line of code</p>
  
  <pre><code>TreeView treeview = (TreeView)currentGroup.Content;
  </code></pre>
  
  <p>lists an error </p>
  
  <blockquote>
    <p>'TreeView' is an ambiguous reference between '<code>System.Windows.Forms.TreeView</code>' and '<code>System.Windows.Controls.TreeView</code>'</p>
  </blockquote>
  
  <p>I know the reason as I need to explicitly state which reference to use as both have <code>TreeView</code> eg :</p>
  
  <pre><code>System.Windows.Controls.TreeView treeview = (System.Windows.Controls.TreeView)currentGroup.Content;
  </code></pre>
  
  <p>What is best practice for this? Is there another(neater) way of defining which reference <code>TreeView</code> must use if used extensively through several methods?</p>