What is the function of this Mainwindow file?

Asked

Viewed 701 times

0

According to the project below:

http://www.macoratti.net/11/06/pp_mvvm1.htm

I know that the purpose of the Main function is to be the main function but in the example presented above the Mainwindow file is also doing the function of presenting the layout this function should not belong to the View? In this context as I would add one more form, acceptable to .NET. By the concept I absorbed it was that I should add one more Mainwindow-style file to add the layout of the second form I wish to assign to the project, this would be correct. After all the function of this Mainwindow file presenting the Layout is correct?

1 answer

1

There is a difference between the method Main and MainWindow of WPF, that MainWindow is equivalent to Form1 of an application winforms.

In WPF, you do not find the method Main because it is generated during the compilation.

https://stackoverflow.com/a/2694710/4713574

  • Following this line of reasoning the Mainwindow equates to the Form1 of a winforms application. Then in the View folder would enter only what is equivalent to the winforms controls?

  • View ? folder you can create multiple... View, Model and Controller standardization only in MVC, for web.

  • View folder referring to the MVVM concept applied over the WPF template.

  • I understood from what I read here: https://msdn.microsoft.com/en-us/library/hh848246.aspx?f=255&MSPPError=-2147217396 your View then would be the Window wpf shampooing, that’s all.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.