Control the entry point of WPF application

The app.main() is gone in default auto-gened WPF application, there are some workarounds to add customized startup app class. I found adding Startup attribute then implement startup eventhandler is a eaiser and clean solution:

Adding Startup property to App.xaml:

<Application x:Class="StakeholderDemo.Layers.WpfUI.App"


Implement code:
public partial class App : Application
  void  App_StartUp(object sender, StartupEventArgs e)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s