Use system default web browser when opening links through Monaco in RegistryPreview (#37466)

* Handled NewWindowRequested WebView2 event, to allow links opened through Registry Preview to open in the system default web browser, rather than a new WebView2 window.

* Modified RegistryPreview implementatiion to use the open URI dialog that is currently used in Peek.
This commit is contained in:
Nathan Gill
2025-02-18 22:01:03 +00:00
committed by GitHub
parent ec136d7bb7
commit cb5baad677
3 changed files with 52 additions and 0 deletions

View File

@@ -31,5 +31,10 @@
VerticalAlignment="Stretch"
Loaded="Browser_Loaded" />
</Border>
<ContentDialog
x:Name="OpenUriDialog"
x:Uid="OpenUriDialog"
PrimaryButtonStyle="{ThemeResource AccentButtonStyle}"
SecondaryButtonClick="OpenUriDialog_SecondaryButtonClick" />
</Grid>
</UserControl>