In order to programmatically include a file to a project I use the method provided in this answer https://stackoverflow.com/a/23537007/1317323
Now I need to go further and add a xaml file and xaml.cs file to my project.
I need to know what would be an accepted string in the method AddItem()
in order to include both files the right way. Something like
p.AddItem("Page", "so.xaml");
// or
p.AddItem("Xaml", so.xaml");
When I use the classic visual studio "right click/ add new item" way, I get this in the csproj file
<ItemGroup>
<Page Include="example.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<Compile Include="example.xaml.cs">
<DependentUpon>example.xaml</DependentUpon>
</Compile>
I read msdn with no luck.
I'm loking for a table that would give the value a the first parameter for a given item type or a way to construct such a table.