When a new WPF Application project is created, MainWindow.xaml
, App.xaml
and their corresponding code behind classes are automatically generated. In the App.xaml
there is an attribute that defines which window is going to be run initially and by the default it's StartupUri="MainWindow.xaml"
I have created a new Dispatcher
class in the same project. At startup, I want the instance of that class Dispatcher
to be constructed and then one of its method to run. That method would actually create and show the MainWindow
window. So how do I modify the App.xaml
or App.xaml.cs
in order to make it happen? Or, if it cannot be done by App
, how should I implement it? Thanks.