In developing a Universal Windows app, when you add an existing XAML and its Codebehind page, they often end up unlinked in the Solution Explorer. This limits the ability to autogenrate event handlers in the codebehind page for UI elements.Spaso Lazarevic has a good solution that involves a little editing of the project file:

 

https://spasol.wordpress.com/2013/03/04/grouping-xaml-and-code-behind-file-in-visual-studio/

 

My additional information: To edit the .csproj file right click on the project in Solution Explorer and choose Unload Project. This doesn’t delete it, but maybe backup the project first if you wish. Then right-click on it and load the project file for editing, edit it as per Spaso’s blog save and reload the project. Wala! Smile