How Can I call RuntimeHostConfigurationOption OnStartup of a WPF (C#) application in .NET 8?
Hi there, I have a WPF application where the UI is a very important thing and heart of the application. Due to some UI elements requirements I have some custom RuntimeHostConfigurationOption which I put in my WPF application through the *.csproj file.
I just put the new item group into the *.csproj file. And Part of my *.csproj file Code looks like this :
<Project>
...
<ItemGroup>
<RuntimeHostConfigurationOption Include="Switch.System.Windows...." Value="true" />
<RuntimeHostConfigurationOption Include="Switch.System.IO......." Value="false" />
</ItemGroup>
...
</Project>
And after that I build my WPF project in Visual Studio 2022 and surprisingly my Application works as expected. But there only one problem, this RuntimeHostConfigurationOption is not called on Application start up if I run my WPF application at a different Laptop with different screen size and different configuration, my Application somehow breaks the way it's performed.
This RuntimeHostConfigurationOption is only works on my development Laptop but it's not work if I change my Computer system or screens.
So, my question is, is there any way to call this RuntimeHostConfigurationOption OnStartup of my WPF application so that my WPF Application is forcefully use this settings each and every time when it start it does not matter it runs on my Development monitor or any other Computer systems.