Please add reference to .NET Assembly "System.Windows.Controls" to resolve the first error. Try to build the project again, if you still find that some of your controls are still not declared, maybe the XAML and the code-behind do not have a matching namespace.