惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
Security Latest
Security Latest
Recent Announcements
Recent Announcements
腾讯CDC
C
Check Point Blog
A
About on SuperTechFans
H
Help Net Security
D
DataBreaches.Net
Martin Fowler
Martin Fowler
GbyAI
GbyAI
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
V
V2EX
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
The Cloudflare Blog
月光博客
月光博客
S
Securelist
F
Future of Privacy Forum
Spread Privacy
Spread Privacy
Recorded Future
Recorded Future
博客园_首页
G
GRAHAM CLULEY
F
Full Disclosure
The Hacker News
The Hacker News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
Recent Commits to openclaw:main
Recent Commits to openclaw:main
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Security Blog
Microsoft Security Blog
Cyberwarzone
Cyberwarzone
NISL@THU
NISL@THU
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog
L
Lohrmann on Cybersecurity
罗磊的独立博客
T
Threat Research - Cisco Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
B
Blog RSS Feed
D
Docker

V2EX

暂无文章

Winform 使用 webview2 集成 React vite 项目
zpzpzp · 2025-02-11 · via V2EX

常见的使用前端 html,css 构建 windows 客户端有 electron 和 tauri ,微软官方的 winform Hybrid 使用的是.net core 版本的 winform 和 wpf ,且集成的是 Blazor ,这个项目使用 winform .netframwork 版本,然后通过 webview2 集成了 react 前端项目,react 使用 vite 打包,wpf 同理
项目中只包含 winform 代码,需要手动在 bin/debug 目录里面创建一个文件夹,名字为 ReactBuild ,然后将 react 打包后的文件放进去就可以了 可以自己改 winform 代码更改路径
同时因为使用 winform ,可以使用自带的 clickOnce 更新,解决了更新的问题
多少有点剑走偏锋,适合这种情况:就是需要兼容 win7 ,需要访问 win32 Api ,团队成员后端语言是 C#,前端会点 react ,但是不想学习 xaml ,软件界面还想好看点,说的好像是我本人哈哈, 但是比 webview 封装一个网址来说少了后端服务器的资源占用,所以还是有点区别的。
https://github.com/zpzpzp1024/WindowsFormsAppWithReact