Wednesday, August 13, 2014

How to 'merge' a XAML file and its code-behind with Visual Studio

You need to edit the .csproj file. Find the <Compile> element for MyTemplate.cs, and add a <DependentUpon> element under it:
<Compile Include="MyTemplate.cs">
  <DependentUpon>MyTemplate.xaml</DependentUpon>
</Compile>

No comments:

Post a Comment