wpf - App class and MainWindow class relationship -
In a WPF project, what kind of a main word class are associated with an AP class? Because of what I am asking for, because in Project Design Base on MVVM, I see some functions that the main windows Can be controlled by Xaml.cs or its code has been applied to the app class instead.
Thank you.
The main window is usually You can remove StartupUri < / Code> in App.xaml
StartupUri in App.xaml and override
OnStartup such as App.xaml.cs
safe override zero start (startup eventsErgus E) {var mainWindow = new main window (); Main window DataContact = & lt; Your Datacontex & gt; MainWindow.Show (); }
Comments
Post a Comment