WPF - Shut-off autogen of Main in App.g.cs

后端 未结 6 1048
情话喂你
情话喂你 2021-02-02 16:06

I\'m learning WPF.

I want to provide my own Main method in my App.xaml.cs rather than getting one generated for me in App.g.cs. However I keep getting conflicts because

6条回答
  •  -上瘾入骨i
    2021-02-02 16:52

    The Easy way just create a class like Startup.cs with build action to compile and remove ApplicationDefinition from App.xaml convert that to page and remove it from any other file in the application

提交回复
热议问题