Visual Studio Doesn’t Auto-Generate Code-Behind for XAML file

If you have a XAML file in a Visual Studio project, but for some reason, Visual Studio won’t auto-generate the code-behind for the XAML then make sure that the following line is in inside the <Project> tag of your project file:

<Import Project=”$(MSBuildBinPath)\Microsoft.WinFX.targets” />

1 comment so far

  1. Bala on

    Thanks for sharing.
    How do I use the same code in C#


Leave a reply