VS 2017WPF set up a form for the first startup item

I. Introduction

Appears in the first time with VS2017WPF form and run when the form loads wrong, there are other unwanted forms, are not addressed in the investigation after a good number of solutions, and finally in the case of ourselves to try under resolved.

Second, the cause

App.xaml will automatically generate a file on each build a new project, but also in this file that automatically add a new project to start, if you build a project on another form, then the time will run the first implementation of construction projects. So this problem is also solved knew, without knowing still very troublesome.

Third, the solution

1. Open APP.xaml WPF file, double-click.

After a series of code will APPlication 2. Open, StartupUri find in the code will be changed to the back of the form you want to start.

Finally, click Run found that the effect achieved, if there are other better solution may be discussing.

Published 137 original articles · won praise 55 · views 160 000 +

Guess you like

Origin blog.csdn.net/yyp0304Devin/article/details/99090375