SpellCheck in WinForms WebBrowser - c#

We are wanting to add spell-check to a website hosted in our application via the WebBrowser control.
If you open our sites in a newer browser like IE9, etc. spellchecking already works in the browser by default.
Is there a way to get this working in the WinForms WebBrowser control?
EDIT: what about making it work in the Frame control in WPF?

Spell checking with IE 11 or Edge is working on Web Browser control and Windows 10 now. I have managed to make it work on a contenteditable body:
foreach (HtmlElement el in Document.All)
{
el.SetAttribute("unselectable", "on");
el.SetAttribute("contenteditable", "false");
}
Document.Body.SetAttribute("width", Width.ToString() + "px");
Document.Body.SetAttribute("contenteditable", "true");
Document.Body.SetAttribute("spellcheck", "true");

I'm planning on trying it myself but IESpell looks like a good client side solution. Should work since the WebBrowser control uses IE under the hood.
EDIT: I had trouble getting IESpell working in the WebBrowser control so I went looking for an html editor and found TinyMCE and another article to use it in WinForms. TinyMCE has a spell check feature.

Related

WebBrowser not loading youtube tv

i have the following URL that doesnt behave in the WPF WebBrowser control as expected. It basically loads only a youtube background image and then stops .. where as firefox/chrome etc. load the youtube view you get on tv-apps.
is there a way to make the WebBrowser load this in the same way?
https://www.youtube.com/tv#/browse-sets?c=UCZGYJFUizSax-yElQaFDp5Q&resume
i tried to parse the same page downloaded with a webclient.. but its also only loading an background page and i dont know how to continue from here.
thanks in advance for any hints
Wpf WebBrowser is a wrapper for IE. If you try to open the link you provided with IE (11 in my case) you can see that it won't work (not supported).
If you change the version of IE that your WebBrowser use (as i described here Script Error in webBrowser control WPF) you can see the not supported page.
You can try using something like https://bitbucket.org/geckofx/ or https://github.com/cefsharp/CefSharp

Script Error in webBrowser control WPF

When am work on webBrowser control using wpf Getting error like "script error" even i pasted screen shot here and even some jquery UI and css not working
I faced this problem too. I need to create browser application which the web has lot of Jquery, JSON etc and webbrowser control does't work as expected (I'm using Windows 10 and Visual Studio 2015)
As solution, I use cefsharp.github.io which allow me to embed a full-featured standards-complaint web browser into C# or VB.NET project solution without hacking windows registry key. It based on Chromium Embedded Framework. It work like a charm!
Just grab nuget packages and create ChromiumWebBrowser class and you are ready to use it.
You have to change your WebBrowser rendering engine, by default it uses the oldest one.
In this link Microsoft describes how you can do it:
http://msdn.microsoft.com/en-us/library/ie/ee330730%28v=vs.85%29.aspx
And you can follow this good answer too.
Will the IE9 WebBrowser Control Support all of IE9's features, including SVG?
Pay attention that if you are running a 32 bit app on a 64bit system you must set this key instead
[HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION]
I tried the site that fails in your screenshot and works well with this registry change from a WebBrowser.

How to use Webkit browser with watiN

i am working on an winform application in which i used watiN. Now when i open my website in default winform browser control, than its design become worst. So i want to use Webkit Browser control in my winform app.
I don't know how to use Webkit Browser in watiN.
I also tried to use GeckoFX for it , but it is also not supporting in watiN.
Can anybody please tell me how can i use other browser controls in watin except Default winform browser control.
I am stucked here
Thanks in Advance

Webbrowser and IE acts differently?

I'm in a trouble trying to fix some problem.. I have a program with Webbrowser control inside it.
It automates crawling process from some website. The problem is that I cannot fix webbrowser after recent website changes.
They have changed page navigation on website. And when I do actions MANUALLY in webbrowser (in my app) it doesn't go to the next/previous page on website. It does nothing... Whereas it works properly in IE 7/8/9 (only scripting errors thrown this time).
So does it mean that Webbrowser is not fully similar to IE??
I'm sorry for not showing source codes here, I think it wouldn't help here. Which way should I go to troubleshoot it? Why page navigation is not working in Webbrowser control?
I tried to simply put Webbrowser on a Window Form in new project and tried to navigate page 2/3/../10 in the website catalog, but it simply changes page number and doesn't navigate to it...
EDIT: Website doesn't work propely even if I do actions manually in webbrowser using mouse clicks.. but works in IE.
EDIT2: I might be not clear in my question. The problem is that I cannot use website even Manually with mouseclicks via my Webbrowser control in app. It changes page number after I click on it, but it doesn't navigate to that page. It stays silent. I'm sure that AllowNavigation property is true. It worked just yesterday and stopped after website changes today... Please tell me which way should I go to troubleshoot it.. I thought that Webbrowser control acts the same way as Internet Explorer.. Any help from you highly appreciated! Thanks
EDIT3: Strange thing... i just loaded Extended Webbrowser and navigated to that website. Page navigation panel doesn't work there also.. Is it a bug on their side or some type of guard from crawlers? What do you think?
(http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx)
I'm sure this isn't the answer your want but using the webbrowser control to scrape websites is very painful to maintain.
Instead use the HttpWebRequest and HttpWebRepsonse objects to recreate the calls to the webserver.
You can use Fiddler (http://www.fiddler2.com/fiddler2) and your browser to record your web sessions and recreate them in code.
You can setup your webbrowser control to disable a number of features including navigation.
I.e. to disable nav in the C# WebBrowser control:
webBrowser1.AllowNavigation = false;
I'd double check that you're not doing anything like this.
I had the same issue with a certain web site that recently changed its format. It has to do with the version of IE used by the control.
Simply force the IE version used to the latest (in my case 9). Setting the appropriate registry item to 9999 for my application worked; see: Webbrowser control behaving different than IE

How to add IFRAME in SilverLight?

How do I add IFrame in a Silverlight 4.0 User control ?
And I want a button on the control that refreshes the IFrame. Is that possible?
To render HTML on top of silverlight, you have to use WindowLess mode. This is a configuration in the object tag. Then you'll need to manually program your IFrame to float in the correct location using javascript or the bridge provided by Silverlight. You can use a commercial control like Robaticus suggested or figure it out on your own.
Either way, none of these options work for Mac. So if you're developing for Windows only, then you're ok. Anyone using Mac will not see any HTML float on top of Silverlight.
If you absolutely want an IFrame in the HTML page (contrary to what the other answers suggest) you could obtain access to the IFrame in Silverlight by using the HTML Bridge
I think you can use WebBrowser class to display IFrame content in Silverlight. Or check this link it will also help you. - How to use iFrame tag in XAML Silverlight 4?
The iframe tag is HTML, not Silverlight. If you have an out-of-browser Silverlight application, you could potentially use the WebBrowser control, but this is not available for in-browser applications.
There is an approach out there where you can essentially make a DIV on your hosting page appear overtop of your Silverlight application, but, in my experience, this is very hard to control, and the visual results are less-than-ideal.
Additionally, there are a few commercial components that do HTML rendering, but they all seem to use the same approach of a floating DIV, and they are not as reliable as I would like to see them.

Categories