简体   繁体   中英

Running WPF browser application in Web Browser

I want to set in whitch browser will run my WPF browser app. Is it possible? If will I click Debug button, it will start my app in google chrome, but I want to run it in IE, because in Google Chrome i have not xpcom.dll.

EDIT:

在此处输入图像描述

I think you would normally do that by setting the start action. Right click on the start up project in the solution explorer and select properties. Go to the debug tab and under start action there should be an option to start an external program where you could choose your preferred browser and set up the command line arguments appropriately.

Trouble is, I've got a feeling this is only available in the full versions of visual studio...maybe you're using an express edition?

It's not possible to do that, I searched Visual Studio configuration, there is no way to set any browser as default visual studio browser. But, if it's very important for you to browse it in specific browser you can switch default browser application inside your project app.cs file. have a look at this links, I hope it will help you understand how to change it in your code [For WPF Application Only] , I looked project properties in solution explorer, you can go to debug tab inside Start Action select Start external program select IE executable file, then under Start Option inside the command line argument clear -Debug then start your application you will see it runs inside IE and will download YOUR_APP_NAME.xbap file.

How do i change default browser using c#

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM