I moved a silverlight file (xaml) to a different project, and now code behind for the file doesn’t recognize the controls.
xaml.cs file does not see controls in xaml file
I’ve updated the namespace, but that doesn’t help.
I’ve updated the class names to be the same, still doesn’t help.
Intelisence doesn’t pick up the controls.
Any ideas? I tried deleting the cs file as well, but there’s no option to “auto re-create cs file”
Thanks!
In VS2010 check the properties of the xaml file. Its Build Action should be “Page” and its Custom Tool should be “MSBuild:Compile”. Also check that the
x:Classelement in the xaml contains the correct fully qualified name that matches the namespace and class name in the code-behind .xaml.cs file.