CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
383 stars 89 forks source link

Fall back to WebBrowser controls when running as admin #250

Closed Andreas-Hjortland closed 4 years ago

Andreas-Hjortland commented 4 years ago

Fixes #13

PR Type

What kind of change does this PR introduce?

What is the current behavior?

The current behavior is that if you run an application which contains a WebViewCompatible control as administrator the WebViewCompatible controller will not show up (will just be a blank view). See #13 for more details

What is the new behavior?

With this change, the application will fall back to using WebBrowser (legacy) controls when running the application elevated as administrator so that it the views will still work.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Just to reiterate for the new tests to pass, we need to run the test suite as administrator, and that will unfortunately make the other tests fail since WebView does not work when running as administrator.

ghost commented 4 years ago

Thanks Andreas-Hjortland for opening a Pull Request! The reviewers will test the PR and highlight if there is any merge conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

dnfclas commented 4 years ago

CLA assistant check
All CLA requirements met.

Andreas-Hjortland commented 4 years ago

It would be better if we could support Edge WebView when running as an administrator, but I think this could be a good compromise if that is not possible, or a stopgap solution until we do support running Edge WebView as administrator

Andreas-Hjortland commented 4 years ago

Done, you can check it out at https://github.com/MicrosoftDocs/WindowsCommunityToolkitDocs/pull/336