C# WPF WebBrowser Multi Touch - c#

Hopefully someone can help, I'm having a few issues embedding a web browser into my application to display a Google maps page.
The page loads correctly in the IE Web browser and Awesomium, However we are actually using a Windows 7 touch screen and if I pinch zoom the Google Map the whole web browser zooms in. It doesn't seem to invoke the touch event on the Google Map.
If I browse to Google Maps via IE or Chrome the map support multi touch gestures, using the chrome.exe or ieexplorer.exe (not embedding in the application).
Is it possible to embed the same functionality into a WPF application?

GekoFX seems to support the touch events.

You may consider DotNetBrowser as an alternative. Its heavyweight mode provides support for touch events, and the Google Maps tutorial is available on C# Corner: http://www.c-sharpcorner.com/article/embed-google-maps-in-net-desktop-application/

Related

Capture a screenshot of Google Map Programmatically

I need to take a screenshot of a Google Map without using a static map in asp.net.
The features I need are not in the static map API, including rotation of the map, traffic, and so on.
I've used several libraries, including the C# web browser, CEFSharp, but none of the ability to take screenshots from the Google map.
For example, my problem with the C# web browser is to load the Google map after the DocumentCompleted event.
The resulting image was displayed as gray content.
How can I get a screenshot of Google Map Programmatically?
Selenium works very well for browser automation in C#. Without knowing your use case not sure if launching a full chrome / Firefox instance will suffice however you can definitely use it launch the browser, navigate to the map, and screenshot.
How to screenshot in Selenium / C# has been nicely answered in another question here .

Embed Youtube video in winforms webbrowser

I am trying to embed YouTube video in C# winforms webbrowser using this code:
webBrowser_q.Navigate("https://www.youtube.com/embed/OsHFxQSOkNU?autoplay=1&controls=0&enablejsapi=1&iv_load_policy=3&rel=0&showinfo=0&showsearch=0&start=0&end=0");
Unfortunately I get only black window instead of the video.
What am I doing wrong?
EDIT: I don't want to use AS3 player, because I want to use YouTube IFrame API.
You can find your answer here:
C# webbrowser Ajax call
According to this answer: "WebBrowser control (both WPF and WinForms versions) behaves in many ways differently from the full IE. You may want to implement Feature Control to bring its behavior as close to IE as possible (particularly, FEATURE_BROWSER_EMULATION)."
You can see the code sample that is given there. I was able to play a youtube video while before I saw a black screen and javascript errors.

How can I scroll through a webpage in the WebBrowser control?

I'm developing an application for Windows CE with Compact Framework 2.5.
The application I'm developing is basically a WebControl. The customer wants the scrollbars hidden (which I have managed), but still wants to be able to scroll through the loaded webpage using the arrow keys on the PDA. However I cannot find a way to control were in the document the WebBrowser currently is?
Does anyone have any ideas? Or a possible alternative to the WebBrowser control, since I have come to the conclusion that the implementation in the Compact Framework is very poor considering the full framework.
Is this a Windows CE or Windows Mobile device?
For windows mobile there are two rendering engines available since AKU 6.1.4: the 'old' PIE and the new IE6 'compatible' engine (http://www.hjgode.de/wp/2013/11/04/windows-mobile-6-internet-explorer-mobile-modes/). The reg key HKLM/security/internet explorer/mshtml value controls the rendering engine used by "Internet Explorer Mobile" (iexplore.exe). The PIE engine display scrollbars by default, the IE6 one not, it can be navigated by the navigation keys. There is a hotfix for compact framework correcting the navigation keys usage: http://support.microsoft.com/kb/975281
If this is a real Windows CE device: if it is a Windows CE 5 based device then there are examples of using the webbrowser control in C/C++ called iesimple etc (AFAIR). Comapct Framework only implements part of the webbrowser API.
It sounds like you are trying to write yet another kiosk mode browser although there are already many out there. Some are device manufacturer dependent, like Intermec Browser, some are usable on generic Windows Mobile devices, like Naurtech Browser (http://www.naurtech.com/products_em.php). These browsers support a bunch of options to control the kiosk mode and usage. I would only write my own kiosk mode browser for simple usage scenarios.
AFAIK there is no way to know from program code, which part of a web page is shown to the user. And it makes no sense to me for a program to know what is currently rendered to the screen. The html and javascript code controls the workflow and data display and change.
There maybe others but the only html engine supporting a SDK beside the MS webbrowser control is ZetaKey. There webkit engine is available for Windows CE/Mobile and they offer a SDK (I do not know there licensing and pricing model). Some open source initiatives have been discontinued, like MiniMo (Mozilla/Firefox).
Please let us know more details about the device and your intention to write your own kiosk mode browser if you need further assistance.

windows c# application for web browser control

I am looking a tutorial for develop a C# application for windows, which can give a extra functionality to the browser controls. i.e. input fields such as input box, text area.
When I using Google+, Facebook, and Twitter also my blog I use my native language. (Sinhala)
My native language has a complexity when is it come to using in computer. it has its own keyboard but it is really difficult to remember. In this case there are some tools to convert English characters in to its phonetic word in my language
i.e.
http://www.ucsc.cmb.ac.lk/ltrl/services/feconverter/t2.html
this above online tool help to convert English character in to is phonetic meaning in my language
i.e. Apal => ඇපල් (Apple)
This tool is developed by University of Colombo School Of Computing SriLanka. That English to Sinhala conversion control by JS.
My requirement is how this get in to C# application and running in particular pc, and when I open my web browser (Firefox, IE, Chrome, etc. ).
It should have run on system background and there should be a system tray icon to on/off it functions on browser (or Short cut key). And when it turn on.
I am wondering how I write a C# app for control Browser inputs and so on.
if you can show me a way to start or If I can have any suitable tutorial, guideline, or code sample, it will be great.
p.s. C# or Java is my prefer language
many thanks
Cheers
Umanda
I would check out the MSDN documentation here for the Web Browser Control. It also provides a sample of the source code at the bottom of the page.
It should have run on system background and there should be a system tray icon to on/off it functions on browser (or Short cut key). And when it turn on.
What you require is a Windows Service, that can be found here.

C# html5 web browser object

I am attempting to make a web browser object in C# which support html5 as good as Safari or Chrome. My main goal is for playing video, or supporting the video tag. So far i have got WebKit.Net working and playing html5 video off w3schools website, but this only works when quicktime is installed; and i really hate that route. I read http://en.wikipedia.org/wiki/HTML5_video so i know somewhat why quick time is needed.
I am currently attempting to wrap up chromium into a C# web browser object. Do you have any suggestions on how i can accomplish creating a C# Web Browser which support html5?
You could also check out my new project: https://github.com/chillitom/CefSharp
This brings the Chromium Embedded Framework to .Net / C#. See the Github page for source, binaries and example.
Some features:
a browser control with navigation commands
INotifyPropertyChanged events
ExecuteJavascript
Register your own scheme/protocol handlers
intercept resource downloads
bind CLR objects into Chromium's JavaScript context.
It's still in the pre-alpha stages so all feedback appreciated.
If you're using WPF, you can use http://chriscavanagh.wordpress.com/2009/08/25/a-real-wpf-webbrowser/. This is a Chromium implementation for WPF.

Categories

Resources