override OnStartup in WPF

前端 未结 3 1636
无人共我
无人共我 2021-01-17 17:08

For some reason I can\'t get this to work at all. I have read from various sources that I can override OnStartup in a WPF application and it will fire off as the App is cre

3条回答
  •  耶瑟儿~
    2021-01-17 17:52

    I think what you really want to do is to subscribe to the Startup event. You can do this in your XAML file:

    
    

提交回复
热议问题