Display HTML pages in WPF application without WebBrowser - html

We have an application that transmits data responses over a radio in the form of an HTML page that is then displayed on a mobile device. The mobile application is beign rewritten in WPF.
We need to display this HTML page in an area of our UI. I have used the WebBrowser control and it displays the page fine. However, the WebBrowser gives you no ability to customize. I have two main stumbling blocks preventing us from using the WebBrowser control for our implementation.
We need to provide particular functionality on a right-click on the control. I cannot get the built in context menu of the WebBrowser control to not display.
We need to customize the scroll bars, which you cannot do with the WebBrowser. We deploy on touch screen devices, so thoroughout our appplicaiton we have fatter scroll bars and additional features for scrolling that the WebBrowser control doesn't allow for.
I'd like to find an alternative.

There is a project/product call Awesomium, which is based on Chromium/WebKit. It is a commercial product, which used to be open-source.
For .NET/WPF it uses the AwesomiumSharp wrapper.

Related

Coded UI - Unable to identify a html controls on a Wpfbrowser

I am new to CodedUI & C#.
I am trying to automate a wpf application which has a WPF Browser.
So basically, It's WPF container with html content inside. I have created a similar sample small application and shared it here. This application opens the amazon.in website within wpfwindow.
WPF Browser application
My problem is Coded UI is not able to identify the Html-Controls/elements like 'Buttons', 'Text input fields' properly.
Below, the top image is from the WPF Browser app [Link which i have shared].
Here you can see a blue square box on the top-left. The coded UI identifies that area has the Search Go button.
Bottom part of the image is of the amazon website in IE browser where coded ui is properly highliting/ identifying the Search Go button.
Does this mean i cannot automate WPFBrowser apps using Coded UI.?
Can someone please tell what to do to identify the buttons properly in coded ui
You need to specify Id attributes for the controls that you want exposed to Coded UI.
To me this looks like CodedUI is getting some control that's similar, rather than the correct one.
You haven't mentioned if you're recording and executing tests or handwriting them in a separate CodedUI solution.
If you're recording them: Be sure that you're recording using your WPF application and interactions inside of them, rather than recording using your browser and then trying to execute tests using the WPF application
If you're writing them by hand: Be sure that you're correctly creating trees of inheritance when writing your tests. For instance, in a traditional CodedUI scenario the absolute top level object that all other controls inherit from is a web browser. In your scenario, that object should be the WPF object. There are probably going to be some other windows or various controls that are children of the WPF application which in turn will finally have the browser as a child.

can the backdrop app be styled, customized or replaced?

On Chromecast, is there any way to customize, style (with CSS), or replace the backdrop application?
(That's the application that runs as a sort of screen saver, when nothing's being cast to the device).
My ideal backdrop app would be an iframe showing something I could control.
No, it cannot be styled or replaced. You have some level of control on what images or information show up there (can be set in your Chromecast app); that is all.

How to force windows 8 touch keyboard to be displayed on the app screen in a winjs application?

Am working on a windows store winjs application and am trying to force display the touch keyboard on the application screen.
I couldn't find any proper solution over the net for the same.
Is there a way to force display it?(would be great if there are some work arounds)
The touch keyboard show & hide behavior is designed to be controlled by the user and should not be changed easily.
Anyway an easy workaround is to set the focus on an input control in the page programmatically. This will make the keyboard appear, but the the control will be back to the user and he will be able to hide it at any time.
Cheack this article for a more complex workaround if you need a bit more control: How do I hide virtual keyboard for select element in Win8 JavaScript app?

Chrome app navigate htmls without creating windows

I'm creating a chrome packaged app, and I need to navigate my htmls without creating a lot of windows, like, if the user click one button, it opens the html in the same window the user are.
Is it even possible? If not, is there a way to make windows modal? So the user can't focus another window without closing the current?
Packaged apps intentionally do not support navigation. Apps are not in a browser, there is no concept of forward, back, or reload. Applications which do require the concept of navigation, or modal dialogs, should use a user interface framework that supports that functionality. In fundamentals, you can navigate by manipulating the DOM or by using CSS to animate and control visibility of components of your app.
The page you want to navigate to can be opened in a new window, then the previous page can be closed.
function navigateToLink (link) {
var current = chrome.app.window.current();
chrome.app.window.create(link);
current.close();
}

Show a PDF document in a browser without the menu bar

I have a touch screen kiosk that displays a webpage and a pdf document. Can I remove the menu bar? Users must not have "save", "print" and other such features.
Update
random screenshot on flickr - I am refering to the print, back/forward, zoom bar that controls the PDF -- not the browser menu. Sorry for not beeing specific.
OK - you should be able to set up most of that in the pdf document itself.
This is going from the menus in Acrobat Pro 9:
File -> Properties -> Initial View
There are some options there for: Hide menu bar, tool bars, window controls
This has been around in acrobat for a while, so most version should do it.
It is alo possible to set these programmatically if you have the right libraries, but easiest to download a demo of acrobat.
OpenOffice also has options to hide controls and forbid printing under:
File->Export as PDF->User Interface
Unfortunately, you can't modify current PDFs. You'll have to have a Word or OOorg document to export.
You should really use PDF Open Parameters for this.
Good discussion on using IE7 in Kiosk mode:
http://samanathon.com/internet-explorer-7s-kiosk-mode/
If Firefox is on option for you, see this plugin:
R-kiosk
Real Kiosk is a Firefox 2.0 - 3.0 extension that defaults to full screen, disables all menus, toolbars, key commands and right button menus. Alt+Home still takes you home
If you are running a machine with the .net framework you could throw together a windows forms app with an embedded web browser control, which gives you a little more control (how do they go back from pdf without a toolbar or a right click?)
But the quickest option that I have used (done a few touchscreens) is just using IE in kiosk mode, which is easily accomplished with command line switches, and setting that to run fullscreen on windows startup.
u need pdf professional version to do that when you create the pdf file,
File -- Properties -- Initial Vies
check the "Hide menu bar" and "Hide tool bars"
Save
Good Luck
Or just use this open source component and get rid of acrobat reader
http://flexpaper.devaldi.com/