[无依赖发布webview2程序] 固定版本运行时环境的方式来实现加载网页
下载固定版本,解压到例如 c:\wb2 目录
https://developer.microsoft.com/zh-cn/microsoft-edge/webview2/#download-section
这里翻译有问题,其实是固定版本(Fixed), 194MB.
winform或者wpf
//设置web用户文件夹
var browserExecutableFolder = "c:\\wb2";
webView.CreationProperties = new Microsoft.Web.WebView2.Wpf.CoreWebView2CreationProperties()
{
BrowserExecutableFolder = browserExecutableFolder
};
测试工程源码
https://github.com/densen2014/BlazorMaui/tree/master/Wpf7WithWebview2
https://github.com/densen2014/BlazorMaui/tree/master/WpfWithWebview2
延申 Blazor winform
网友 LINE 研究结果:
要在 OnContentRendered 执行
关联项目
FreeSql QQ群:4336577
BA & Blazor QQ群:795206915
Maui Blazor 中文社区 QQ群:645660665
知识共享许可协议
本作品采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。欢迎转载、使用、重新发布,但务必保留文章署名AlexChow(包含链接: https://github.com/densen2014 ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请与我联系 。
转载声明
本文来自博客园,作者:周创琳 AlexChow,转载请注明原文链接:https://www.cnblogs.com/densen2014/p/16984378.html
AlexChow
今日头条 | 博客园 | 知乎 | Gitee | GitHub