-
“InitializeComponent() does not exist in the current context” after copying XAML files
Situation You copied XAML files in Visual Studio. Problem Visual Studio now can’t compile anymore, reporting that the InitializeComponent() method in the code-behind of your XAML files does not exist in the current context. Solution The build action of your XAML files has probably changed to “Resource”. Change it (back) to “Page”. Sources http://stackoverflow.com/questions/954861/why-can-visual-studio-not-find-my-wpf-initializecomponent-method
-
Using a CLR-namespace of another assembly in XAML
Situation You want to use a CLR namespace of another assembly in your XAML. Problem A simple xmlns:custom=”clr-namespace:MyOtherAssembly.MyDesiredNamespace” won’t do the trick. Solution Identify the assembly within the namespace string. Example xmlns:custom=”clr-namespace:MyDesiredNamespace;assembly=MyOtherAssembly” Sources http://msdn.microsoft.com/en-us/library/ms747086.aspx