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

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - 扬中源

解决Avalonia.Markup.Xaml.XamlLoadException:“No precompiled XAML found for _xxxx.App, make sure to specify x:Class and include your XAML file as AvaloniaResource” vs2022 android模拟器闪退 VS2022 C# grpc遇到的问题 在Avalonia中,如何移除高度的值,使其为NaN 用bat批处理,winrar备份文件夹并排除特定子文件夹 用完我的风扇终于不吵了。 Excel把一列数据变两列,带条件分组的行变列 yellowbrick中ClassificationReport多分类图标一行数据异常全为0 ModuleNotFoundError: No module named 'yellowbrick.features.importances' 动手学深度学习MXNet配置 用Goaccess对Nginx进行性能监控windows版 只能判断文件图片类型,并修改文件名 微信电脑版提取微信小程序中的音频 NFC手机制作备用门禁卡 win7有些电脑form布局发生变化 微信小程序wepy textbox根据内容自动调整高度 Oracle连接错误解决办法 cef chromium相关
Avalonia跨平台嵌入浏览器的方法
扬中源 · 2024-03-13 · via 博客园 - 扬中源
Avalonia跨平台web嵌入浏览器的方法 最常用的是cef

https://gitcode.com/AvaloniaCommunity/awesome-avalonia/overview#web-browsers?utm_source=csdn_github_accelerator&isLogin=1
这里列了几种web方案,有些不支持linux,cefnet尝试了下,linux也能用,但需要系统重某些依赖包要升级,导致安装比较麻烦。

Web Browsers


因此尝试以下方案:
Avalonia.HtmlRenderer,看起来还不错
https://github.com/AvaloniaUI/Avalonia.HtmlRenderer/tree/master
NuGet: https://www.nuget.org/packages/Avalonia.HtmlRenderer/11.0.0

 HTML Renderer AddFontFamily

_htmlPanel.Container.AddFontFamily(new FontFamily(
new Uri("avares://HtmlRenderer.Demo.Avalonia/fonts/CustomFont.ttf"),
"1 Smoothy DNA"));

上面代码Container.报错。改成下面的:


var f = new FontFamily(
new Uri("avares://AvaloniaAAA/Assets/Fonts/KaiTi.ttf"),
"KaiTi");


HtmlRender.AddFontFamily(f);

htmlPanel.Text = @"<p style=""font: 20px 'KaiTi'"">参数 <b><img src=""https://image.wjx.com/images/index/assessment.png""></b> sq</p><table border=""1"">