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 StartupUri < / Code> in App.xaml

You can remove 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

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -