1) In the xaml file, check the x:Name of the main layout. Rename it
2) Compile. It should throw errors
3) Go back to the xaml file and give the same class name as it associated code behind file has (.cs file) Also include the namespace. eg: if namespace is "X" and class name is "Y", x:Name = "X.Y"
4) Compile. It should work.