MicrosoftDocs / edge-developer

Developer documentation for Edge.
https://learn.microsoft.com/microsoft-edge/developer/
Creative Commons Attribution 4.0 International
381 stars 507 forks source link

WinAppSDK supports custom WebView2 environments #3104

Closed mikehoffms closed 5 months ago

mikehoffms commented 6 months ago

Rendered article for review: https://review.learn.microsoft.com/microsoft-edge/webview2/get-started/winui?branch=pr-en-us-3104

Rendered article sections for review:

This PR fixes #3101.

AB#49444968

david-risney commented 6 months ago

The SmartScreen section is also now out of date. We no longer will want folks to use environment variables but instead use a custom CoreWebView2Environment. I'm checking the right way to do this now. The PR won't let me put comments on that part of the file.

mikehoffms commented 6 months ago

The SmartScreen section is also now out of date. We no longer will want folks to use environment variables but instead use a custom CoreWebView2Environment. I'm checking the right way to do this now. The PR won't let me put comments on that part of the file.

re: SmartScreen: i pushed a commit to modify SmartScreen section to make it appear in PR > Files Changed (fresh/short url: https://github.com/MicrosoftDocs/edge-developer/pull/3104/files ), to enter PR comments in it. @david-risney

PR Comment in SmartScreen section

Rendered section: https://review.learn.microsoft.com/microsoft-edge/webview2/get-started/winui?branch=pr-en-us-3104#smartscreen

DmitriyKomin commented 6 months ago
</Window>

In WinAppSDK, the xmlns:controls="using:M.U.X.C" isn't necessary, WebView2 is an inbox control equivalent to the others (i.e. Button).


Refers to: microsoft-edge/webview2/get-started/winui.md:161 in 3b3549a. [](commit_id = 3b3549ac314afe4d89b243d36a61bf308e379c0d, deletion_comment = False)

DmitriyKomin commented 6 months ago
  1. These debugger dialogs are a known bug. Click the OK button, and then click the Cancel button to close the dialogs.

That bug was fixed, and this should now be removed (the [benign] exception is handled and swallowed - it should only come up if you have the debugger set to break on first chance winrt exceptions]


Refers to: microsoft-edge/webview2/get-started/winui.md:295 in 3b3549a. [](commit_id = 3b3549ac314afe4d89b243d36a61bf308e379c0d, deletion_comment = False)

DmitriyKomin commented 6 months ago

Please remove, this guidance no longer applies (it was specific to ~several years ago when WebView2 was first added to WniUI3)


Refers to: microsoft-edge/webview2/get-started/winui.md:384 in 3b3549a. [](commit_id = 3b3549ac314afe4d89b243d36a61bf308e379c0d, deletion_comment = False)

mikehoffms commented 6 months ago
  1. These debugger dialogs are a known bug. Click the OK button, and then click the Cancel button to close the dialogs.

That bug was fixed, and this should now be removed (the [benign] exception is handled and swallowed - it should only come up if you have the debugger set to break on first chance winrt exceptions]

Refers to: microsoft-edge/webview2/get-started/winui.md:295 in 3b3549a. [](commit_id = 3b3549a, deletion_comment = False)

Deleted:

  1. These debugger dialogs are a known bug. Click the OK button, and then click the Cancel button to close the dialogs.

@DmitriyKomin

mikehoffms commented 6 months ago
</Window>

In WinAppSDK, the xmlns:controls="using:M.U.X.C" isn't necessary, WebView2 is an inbox control equivalent to the others (i.e. Button).

Refers to: microsoft-edge/webview2/get-started/winui.md:161 in 3b3549a. [](commit_id = 3b3549a, deletion_comment = False)

Deleted the attribute: xmlns:controls="using:Microsoft.UI.Xaml.Controls" @DmitriyKomin

learn-build-service-prod[bot] commented 5 months ago

Learn Build status updates of commit f9b2209:

:white_check_mark: Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/get-started/winui.md :white_check_mark:Succeeded View

For more details, please refer to the build report.

For any questions, please:

DmitriyKomin commented 5 months ago
  1. These debugger dialogs are a known bug. Click the OK button, and then click the Cancel button to close the dialogs.

Thanks, the previous section (7 - "The following Visual Studio Dialogs... + the screenshot) should be removed too)


In reply to: 1998311371


Refers to: microsoft-edge/webview2/get-started/winui.md:295 in 3b3549a. [](commit_id = 3b3549ac314afe4d89b243d36a61bf308e379c0d, deletion_comment = False)

learn-build-service-prod[bot] commented 5 months ago

Learn Build status updates of commit 5ef0e1e:

:white_check_mark: Validation status: passed

File Status Preview URL Details
microsoft-edge/webview2/get-started/winui.md :white_check_mark:Succeeded View
microsoft-edge/webview2/get-started/winui-images/debugger-not-configd.png :white_check_mark:Succeeded n/a (file deleted or renamed)

For more details, please refer to the build report.

For any questions, please:

mikehoffms commented 5 months ago

Removed all remaining mentions of the debugger dialogs, and the .png file. @DmitriyKomin

  1. These debugger dialogs are a known bug. Click the OK button, and then click the Cancel button to close the dialogs.

Thanks, the previous section (7 - "The following Visual Studio Dialogs... + the screenshot) should be removed too)

In reply to: 1998311371

Refers to: microsoft-edge/webview2/get-started/winui.md:295 in 3b3549a. [](commit_id = 3b3549a, deletion_comment = False)