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

后端 未结 6 1047
情话喂你
情话喂你 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条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-02 17:05

    You can also just create a separate class (for example, Entry) which is responsible for bootstrapping your application. Then go to project settings and set your startup object to Entry. That way you don't even have to disable the autogenerated method.

提交回复
热议问题