title: Silverlight 2 User Control - Unknown attribute name on element
body: <p>Update:</p>
  <p>Screenshot <a href="http://farm4.static.flickr.com/3277/3048788466_661e8e5e78_b.jpg" rel="nofollow noreferrer">http://farm4.static.flickr.com/3277/3048788466_661e8e5e78_b.jpg</a></p>
  <p>To reproduce:</p>
  <ol>
  <li><p>Get this sample project from Silveright.net - <a href="http://download.microsoft.com/download/5/9/2/5922d533-7ed5-4065-a138-ce3d9ca266e5/4-UserControls_Source_CS.zip" rel="nofollow noreferrer">http://download.microsoft.com/download/5/9/2/5922d533-7ed5-4065-a138-ce3d9ca266e5/4-UserControls_Source_CS.zip</a></p>
  </li>
  <li><p>Open the UserControlDemo Solution. Then on Line 9 of Page.xaml, you'll see the error.</p>
  <p><a href="http://download.microsoft.com/download/5/9/2/5922d533-7ed5-4065-a138-ce3d9ca266e5/4-UserControls_Source_CS.zip" rel="nofollow noreferrer">http://download.microsoft.com/download/5/9/2/5922d533-7ed5-4065-a138-ce3d9ca266e5/4-UserControls_Source_CS.zip</a></p>
  </li>
  </ol>
  <p>I'm creating a User Control in Silverlight 2 using <a href="http://silverlight.net/learn/tutorials/UserControls.aspx" rel="nofollow noreferrer">this</a> as my guide.</p>
  <p>The problem is that when I use my User Control in Page.xaml, the XAML canvas shows this error: &quot;Unknown attribute Name on element ... .&quot;</p>
  <p>Due to this error, I can no longer preview my XAML canvas. The strange thing is that the project still builds and renders my User Control beautifully.</p>
  <p>Upon investigating the problem, I've found out the the cause of the problem was that my User Control was using a Style which is a StaticResource. When I remove this Style Property, the error in my Page.xaml XAML file disappears.</p>
  <p>This error has been talk about in <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=376059" rel="nofollow noreferrer">other</a> <a href="https://silverlight.net/forums/t/30696.aspx" rel="nofollow noreferrer">online</a> <a href="http://silverlight.net/forums/p/41995/117724.aspx" rel="nofollow noreferrer">threads</a> but unfortunately to no resolve.</p>
  <p>I'm using the latest release and service packs of Visual Studio 2008 and Silverlight 2.</p>
  <p>Is there something wrong with what I'm doing or is this a VS/Silverlight bug?</p>
  <p>Thanks in advance!</p>