cefsharp

Cache Busting not working in CefSharp

时光怂恿深爱的人放手 提交于 2019-12-13 01:57:04
问题 I am using cefsharp (chromium embedded framework for .NET) to host a web application that uses require js to load in most of my javascript modules. To speed up my application I have enabled cacheing via response headers "Cache-Control: public,max-age=864000" for all my static content. When I deploy a new version of my web application i am appending a version number that gets incremented with every deployment in the urlArgs param of require.config() to perform a "cache bust" when my content

Looking for a specific tag

那年仲夏 提交于 2019-12-13 00:46:01
问题 I had a previous question regarding a way to access a proxy card from within a web page when using Chrome. I'm now attempting to instead use a vb.Net application with an embedded CefSharp object. I have the code I need to access the proxy card (thanks to Smart Card API), but I need an easy way to indicate that this is even an option. My thought is to: Put an otherwise empty element on the web page (such as <div id='smartcard' /> ) Inside Visual Basic, monitor the contents of the page for this

CefSharp ProgressBar for indicating download progress

混江龙づ霸主 提交于 2019-12-13 00:04:31
问题 I am making a web browser based on CefSharp. When I try to download a file from the web, it prompts me to save the file, and when I press Save, it downloads the file without indicating any progress percentage. I want to add a ProgressBar to show download progress. How can I do this? 回答1: You can use an IDownloadHandler for that. Suppose you have a browser control named Browser and a ProgressBar named Bar in your XAML, you can do this in your code behind: Browser.DownloadHandler = new

Force CEFSharp to download without showing dialog

空扰寡人 提交于 2019-12-12 22:11:47
问题 I have a WPF application with CEFSharp, it's a web browser, when I click on a download link it will show me a dialog and ask me where you want to save the file? How can I force the web browser to download any files without showing dialog? I want to create some thing like google chrome. so when you click on a download link it will download the file to a default path (usually it's in "Documents/Downloads") now how can I implement this in my application? if I need to change CEFSharp source code

cefsharp wpf wpf加载svg 在同一个页面中打开链接

耗尽温柔 提交于 2019-12-12 21:07:56
安装 PM> Install-Package CefSharp.Wpf 解决方案->属性->配置属性->活动解决方案平台—新建-x64 在需要使用的窗体上引用xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" 重新生成解决方案 引用 <cefSharp:ChromiumWebBrowser Name="browser" Grid.Row="0" Address=" http://www.baidu.com " Margin="10,43,10,10"/> 加载页面 var value=" http://cnglogs.com/ives "; browser.Load(value); 获取IBrowser对象,对页面的前进、后退操作需要此对象 private IBrowser IBrowser { get { return browser.GetBrowser(); } } IBrowser.GoForward();//前进 IBrowser.Reload();//重载 IBrowser.StopLoad();//停止 IBrowser.GoBack();//后退 加载svg 安装:Install-Package SharpVectors -Version 1.0.0 <Button x:Name=

C# ChromiumWebBrowser: Prevent control from stealing focus

£可爱£侵袭症+ 提交于 2019-12-12 12:32:37
问题 I'm making a program that has a Form with a ChromiumWebBrowser in it. The navigation is done automatically. When webbrowser complete it's task, I'll dispose it, create a new webbrowser, add it to form, and load a new address. But, when the new webbrowser was created and added to form, the program jumps in front of what ever other program is in the top with focus. Example: I start my program, press the button to start its task, open notepad to type some text and my program jumps in front of it

C# Windows (touch -> click/focus) messages between Form and Controls (WM_xxx)

人走茶凉 提交于 2019-12-12 05:28:06
问题 I have a 3rd party open-source control (not important which one really, but its CefSharp's Chromium Web browser [v 43]). Initially, there was a problem where if a form menu was open when you clicked inside the control, the menu was not dismissing itself (as if the control was swallowing the click event). To circumvent this, the sample application suggested intercepting the WM_MOUSEACTIVATE message between the form and the control, and reacting by posting a WM_NCLBUTTONDOWN back to an element

make C# method wait for JS event to happen

≯℡__Kan透↙ 提交于 2019-12-12 05:19:51
问题 Intro I'm programming a project where C# and JavaScript code need to work together, so I decided to use CefSharp as it guarantees the latest JS features (in contrast with WebView). The Goal Now I need to create an async C# method which would call an async JS function and then wait for it to finish . The problem is that JavaScript doesn't have anything like the await keyword, so everything is defined in terms of events . This is what the Javascript code looks like: var name1 = "A"; var name2 =

How to make getUserMedia() method works on Chromium Web browser inside WinForms application?

陌路散爱 提交于 2019-12-12 03:50:35
问题 I'm trying to get access to my webcam from my WinForms application using Chromium webbrowser control, to do that I installed my HTML file - which is shown below - to a server (on my machine) then I tried to navigate to it from my application but the error callback of getUserMedia() method was executed showing "Permission Denied Error", on the other hand it's working fine if I tried to navigate to it directly from chrome. So, is there anyone could know what causes this error ? // client.js

CefSharp ChromiumWebBrowser - not displayed/rendered

久未见 提交于 2019-12-12 03:38:05
问题 I have a simple application, a Grid with a ChromiumWebBrowser inside. When I create the ChromiumWebBrowser in XAML, it works. But when I create it from the code-behind and add it to the grid, it doesn't show up - I just get the Grid's black background. <!--This works--> <Grid Name="gRight" Background="Black"> <cefSharp:ChromiumWebBrowser x:Name="cefBrowser" Margin="0,20,0,0" Address="http://www.google.com" /> </Grid> The code that doesn't work : public Window1() { InitializeComponent(); bool