Instead of excluding it, by mistake, I deleted the .cs code behind file for an Xaml file. Now, I don't know how to add the code behind.
This Window is empty with no UI controls on it. "View Code" is disabled and I can't see the Events (lightning bolt icon) anywhere for this xaml.
Please help.
There are two required steps and one optional:
<DependentUpon>
element below your <Compile>
element for the .xaml.cs file so that it will appear "inside" the .xaml file not simply below it. If you are updating project to be edited with Blend (v4), this third step is required, not optional, in order to use the inspector to add events to controls.To easily edit the .csproj file:
If you're using VB.NET, everything the same, just replace "cs" with "vb".