When I try using a Name='id' and\or x:name='id' I get a compiler error:
The Type 'MyName' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
When I don’t have this specified my control runs just fine. Any suggestions?
Well, first of all the right syntax is
x:Name, althoughNameby itself usually (but not always) works too.Does the
x:Classon your root-level element match the name (and namespace!) of your code-behind file? I know that some versions of Blend and VS didn’t insert the default namespace correctly, and of course if you’ve changed it from the default you’ll need to make sure you’ve changed the other file as well.