WebView2 中的搜索功能 [英] Search functionality in WebView2

查看:41
本文介绍了WebView2 中的搜索功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提前致谢!

在我的应用程序中,我在 WPF 用户控件中嵌入了一个 WebView2 控件.

In my application, I have embedded a WebView2 control inside a WPF usercontrol.

是否有任何方法或解决方法可以帮助我在 WebView2 控件中搜索文本?我看到搜索文本框通过 Ctrl + F 打开.我的要求是通过自定义按钮点击调用此功能.

Is there anyway or a workaround that can help me to search text in the WebView2 control ? I see that the search text box opens up through Ctrl + F . My requirement is to call this functionality through the custom button click.

我发现 Microsoft 提供的当前 WebView2 预发布 SDK 没有任何特定于查找或搜索功能的东西.

I identified that the current WebView2 pre-release SDK provided by Microsoft does'nt have any thing specific to find or search functionality.

推荐答案

WebView2 目前不支持您调用或以其他方式控制在页面对话框中查找,我不知道除了实现您自己的在页面中查找之外的任何解决方法HTML 文档中的样式控制.

WebView2 currently has no support for you invoking or otherwise controlling the find in page dialog and I don't know of any workaround other than implementing your own find in page style control in your HTML document.

如果您愿意,可以在我们的 WebView2 反馈页面上打开功能请求问题.请让我们确切地知道您希望使用在页面中查找"对话框执行的操作以及原因.谢谢!

If you like, you can open a Feature Request issue on our WebView2 Feedback page. Please let us know exactly what you want to be able to do with the find in page dialog and why. Thanks!

这篇关于WebView2 中的搜索功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆