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

后端 未结 6 1046
情话喂你
情话喂你 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 16:55

    The easiest way is to set the Build Action in the Properties window from ApplicationDefinition to Page for App.Xaml.

    Then you can define your own entry point.

提交回复
热议问题