Hi @Volker Veidt ,
The issue is that WinUI can't find the default style defined in generic.xaml as the compiled Generic.xbf
that contains it is not copied over to the app. Visual Studio takes care of this for a C++ app, but not for a C# project through a NuGet package. So, the workaround is to do that through the NuGet package yourself.
You can follow the steps below.
1.Download the project you shared in GitHub https://github.com/vmx17/NetProjection
2.Update SimpleMathProjection.nuspec with:
...
<file src="..\..\_build\x64\Release\SimpleMathComponent\obj\embed\SimpleMathComponent\Themes\Generic.xbf" target="content\Generic.xbf"/>
<file src="SimpleMathComponent.targets" target="build\SimpleMathComponent.targets"></file>
</files>
3.Add SimpleMathComponent.targets
with:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)\..\content\Generic.xbf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<TargetPath>SimpleMathComponent\Themes\Generic.xbf</TargetPath>
</Content>
</ItemGroup>
</Project>
4.Change "Theme" to "Themes"