Reproduced in: http://dotnetframework.blogspot.com.au/2011/01/wpf-browser-application-wpf-windows.html
WPF Browser application is the newer feature in WPF. In fact its basic concept is still ClickOnce Application. Therefore, we must be very careful in the handling of authority and safety control.
If your system has been developed with WPF Browser Project template, how do we quickly and painlessly convert to WPF Windows application? After studying it, we found that we could quickly switch programs to WPF Window application using the way we modified the project file.
Let me start with Visual Studio 2010, select WPF Browser application, project name: HelloWorld, build a WPF Browser application paradigm
Open the Helloworld.csproj (*.csproj) original file.
Instead of opening a special eucalyptus, open the XML content of Project File
In the PropertyGroup section, find three tags.
-
StartAction: Refers to the start location of the debug, corresponding to the Project property Windows
hostInBrowser: Whether to start with IE
Generatemanifests: Whether to set permissions, corresponding to project property Windows
- <StartAction>URL</startaction>, change to <StartAction>Project</StartAction>
- <HostInBrowser>truefalse</ Hostinbrowser>
- <GenerateManifests>true</generatemanifest>, change to <GenerateManifests>false </GenerateManifests>
Reload the project once and execute the program again, and you'll see that the original program becomes WPF Windows application
How to convert a WPF browser app to WPF Windows application