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

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -