How to change StartupUri of WPF Application?

前端 未结 4 485
说谎
说谎 2020-12-31 03:26

I am trying to modify App.cs and load the WPF XAML files from code behind but its not working as it should.

No matter whatever I try to set as StartupUri it doesnt s

4条回答
  •  半阙折子戏
    2020-12-31 03:46

    Do you still have a StartupUri specified in the XAML? If so, remove it and see if that helps.MSDN Source

    If not, you may need to approach this differently: have your Dialog as your startup, then from that point open another Window based on the selected value.

提交回复
热议问题