cefsharp

WPF and CefSharp: sluggish performance

[亡魂溺海] 提交于 2019-12-04 04:46:21
问题 I have successfully made a personal mini browser app in c# winforms. Because I want some more fancy effects, I was considering to make a WPF app. So I tried the wiki tutorial and set up a simple WPF form with a browser, but noticed it has sluggish performance. It's even noticeable when selecting text in very simple webpage, or just when scrolling the page. Is there anything that can be done? If not, I guess it will be just winforms then, since that one behaves and performs well. edit: my

CefSharp load a page with browser login

空扰寡人 提交于 2019-12-04 03:24:57
问题 I need to ebed a web browser in a Wpf app, I tried with the one from the toolbox but get some issues and went to CefSharp. public MainWindow() { InitializeComponent(); BrowserSettings settings = new BrowserSettings(); Cef.Initialize(new CefSettings()); CefSharp.Wpf.ChromiumWebBrowser webBrowser = new CefSharp.Wpf.ChromiumWebBrowser(); licence_grid.Children.Add(webBrowser); webBrowser.Address = "http://myurlToLoad the page"; } The problem is when I used a normal url the page load. But when I

关于CefSharp使用的一些备忘

核能气质少年 提交于 2019-12-04 02:39:53
相关资料: how-to-use-cefsharp-chromium-embedded-framework-csharp-in-a-winforms-application       CefSharp中文帮助文档 一、安装及设置 1、引入   通过NuGet package搜索CefSharp (安装:CefSharp.WinForms)   当前版本:75.1.143,.net框架需要4.5.2或以上 2、建议重启下项目 3、设置any cpu   1)项目-属性-生成-首选32位   2)文件<your-project-name>/<your-project-name>/your-project-name.csproj中,第一个<PropertyGroup>节点内,加入<CefSharpAnyCpuSupport>true</CefSharpAnyCpuSupport>      3)App.config文件<configuration>节点内加入    <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="x86"/> </assemblyBinding> </runtime> 二、基本使用 public ChromiumWebBrowser

winform集成cefSharp,与页面进行交互

人走茶凉 提交于 2019-12-03 11:15:37
/// <summary> /// 为了使网页能够与winForm交互 将 com 的可访问性设置为 true /// </summary> [System.Runtime.InteropServices.ComVisible(true)] public partial class Form1 : Form { /// <summary> /// 声明变量 /// </summary> private CefSharp.CefSettings _settings; ChromiumWebBrowser _browser; public Form1() { try { InitializeComponent(); //初始化cefSharp AppLog.Info("cefSharp init ..."); _settings = new CefSharp.CefSettings(); CefSharp.Cef.Initialize(_settings); //下面设置,减少白屏的发生,此为cefSharp的bug if (!_settings.MultiThreadedMessageLoop) { Application.Idle += (sender, e) => { Cef.DoMessageLoopWork(); }; } AppLog.Info("cefSharp init

winform屏蔽鼠标右键

久未见 提交于 2019-12-03 11:13:06
/// <summary> /// 屏蔽右键 /// </summary> internal class MenuHandler : IContextMenuHandler { public bool OnBeforeContextMenu(IWebBrowser browser, IBrowser ibrower, IFrame iframe, IContextMenuParams icontextmenuparams, IMenuModel imenumodel) { return false; } void CefSharp.IContextMenuHandler.OnBeforeContextMenu(CefSharp.IWebBrowser browserControl, CefSharp.IBrowser browser, CefSharp.IFrame frame, CefSharp.IContextMenuParams parameters, CefSharp.IMenuModel model) { model.Clear(); } bool CefSharp.IContextMenuHandler.OnContextMenuCommand(CefSharp.IWebBrowser browserControl, CefSharp.IBrowser browser,

使用CefSharp在.NET中嵌入Google kernel

梦想的初衷 提交于 2019-12-03 10:41:59
原文: 使用CefSharp在.NET中嵌入Google kernel   使用CefSharp可以在.NET轻松的嵌入Html,不用担心WPF与Winform 控件与它的兼容性问题,CefSharp大部分的代码是C#,它可以在VB或者其他.NET平台语言中来进行使用。   近几天来,公司项目中需要使用 WebBrowser, 其中考虑了几个控件,如 1.Winform中的WebBrowser 2.WPF中的WebBrowser 3.WebKit.Net 4.CefSharp   Winform的WebBrowser放到项目中进行了实验和处理,发现致命问题:AllowsTransparency = true 和 Webbrowser 等内置窗体显示冲突,导致不发选择,还有就是GC回收不及时,一下子就飙到了100MB+.   后来考虑WPF的webbrowser 它实际上还是封装了Winform,有个严重的问题就是它一直置顶到最顶层,so,无法选择。   再后来考虑 WebKit.Net , 但发现已经N多年没有更新,所以不在考虑...   最后跌跌撞撞跑到CefSharp,发现非常的坑啊!!竟然不支持 AnyCPU,关键是我的项目中有的功能是必须AnyCpu启动的啊!还好,官方在去年已经公布了支持AnyCpu的方法。   首先Nuget引用cefsharp.WPF

Winforms CL20R3 with CefSharp Project

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a similar problem to this question C# windows appication Event: CLR20r3 on application start The error is like this: Application: MantenedorPlanesMain.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileNotFoundException Battery: in CefSharp.Example.CefExample.Init () in CefSharp.WinForms.Example.Program.Main () But only on some machines, for example, on my computer I can use the program without any problem and in a computer of my office too. I tried to

Cefsharp and video tag WebRTC

耗尽温柔 提交于 2019-12-03 09:13:00
I'm trying to write a wpf with webrtc support. The access to the camera works but the display of the from the page doesn't. Can anyone help? You can do something like this: var cefSettings = new CefSettings(); cefSettings.CefCommandLineArgs.Add("enable-media-stream", "enable-media-stream"); Cef.Initialize(cefSettings); This has the same effect as passing the command line argument I assume you want to display video from your camera via WebRTC so I think it requires a call to .getUserMedia() to get hold of your camera. For that to work you must use CefSharp based on Chromium 30 or later. So

how to set the support of mp3 and ffmpeg codec libraries to cef?

泪湿孤枕 提交于 2019-12-03 03:42:51
I want to have cef lib with support of mp3 and ffmpeg codecs. How can i re-compile the library of cef with these codec features inside it. I want to learn, where should I edit inside the cef library or cefsharp? Then how to compile it to reuse it.. I am using cefsharp version 47. NOTE: PLEASE CONSIDER LEGAL ISSUES BEFORE PROCEEDING There is a way to enable MP3 support in CEF, but you'll have to modify the cef.gypi in the source distribution, regenerate the visual studio projects and rebuild. Step by step instructions: a a See this SO question: Chromium Embedded Framework MP3 support It

Cefsharp and video tag WebRTC

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to write a wpf with webrtc support. The access to the camera works but the display of the from the page doesn't. Can anyone help? 回答1: You can do something like this: var cefSettings = new CefSettings(); cefSettings.CefCommandLineArgs.Add("enable-media-stream", "enable-media-stream"); Cef.Initialize(cefSettings); This has the same effect as passing the command line argument 回答2: I assume you want to display video from your camera via WebRTC so I think it requires a call to .getUserMedia() to get hold of your camera. For that to