I'm currently building a desktop app using C# winforms. One of the requirement is to display the client's website on a form, so I've just added a webbrowser widget.
This webpage seems to "lag" a lot, all CSS or JQuery animations seems jaggy. I tried to open the page in IE and it doesn't lag that much.
Is there any option I need to pass to the webbrowser widget to make it more faithfull ? Some double buffering, or any other kind of parameters that I could use ?
Related
Does anybody know how can we get the form controls references in a web page that loaded in the CodeNameOne Web browser component?
I want to load a web page in CodeNameOne web browser component, then read or change the value of form input controls (For example TextBoxes) in the java code after pressing the submit button.
Regards,
Kasra
Its not an ideal way to work and would reduce the portability of your application. You can look at the JSObject class that represents a bridge between the JavaScript and Java sides.
As title said I have a issue to use “pull to refresh” feature with WebBrowser in Codenameone.
The issue is that “pull to refresh” feature cannot be used with BorderLayout and I need this type of layout to expand WebBrowser over entire screen.
I’ve tried different mix of layouts combinations to avoid usage of BorderLayout so that “pull to refresh” can work but the final result is that I cannot expand WebBrowser over entire screen and have at same time the “pull to refresh” working.
Question: How can I have WebBrowser expanded over entire screen so that I can use “pull to refresh” feature for it?
Thanks.
WebBrowser is a Peer Component hence it handles everything natively including pointer events. This means our pull to refresh logic can't possibly work within a web browser and you have quite a few other limitations.
If you want pull to refresh functionality in a WebBrowser you will need to do it using JavaScript, its an all or nothing issue. FYI You should use a BorderLayout with WebBrowser.
I am using a customized alert message for my whole application which generates from a .js file and a .css file. I have also used silverlight in my application and shows MessageBox from silverlight with its default design. Now i want to customized that MessageBox in silverlight.
So, can anyone plz help me to know how to add js and css file to silverLight application and how to use it
You can't change the built-in MessageBox style as easily as simply creating your own modal window. There are lots of custom messageboxes about and many have source code.
e.g.
Creating a reusable MessageBox dialog.
Silverlight Modal Dialog With Custom User Controls
Custom MessageBox Control for Silverlight 3
Note: these are all Silverlight solutions, so you are authoring in XAML and with style, not using JS and CSS.
It is also possible to call JS functions on the page from within Silverlight if you think that will be easier for your solution.
Can I embeded IE in my wpf application and interact with it firing events?
e.g. can I fill a form and press submit button programmatically?
Below is the link to the web browser control for WPF, this control was not part of the initial release of WPF, and was added in 3.5 SP1. As long as you are targeting 3.5 SP1 you can use this control and interact with the content in it. I have a WPF application that does use this control and we do a lot of JavaScript interactivity with the content from the browser by drawing on a WPF canvas and sending that information to the content API of the web browser control.
If you need an example I can look up some code samples from the application and send them your way.
Can I embeded IE in my wpf application and interact with it firing events?
e.g. can I fill a form and press submit button programmatically?
Below is the link to the web browser control for WPF, this control was not part of the initial release of WPF, and was added in 3.5 SP1. As long as you are targeting 3.5 SP1 you can use this control and interact with the content in it. I have a WPF application that does use this control and we do a lot of JavaScript interactivity with the content from the browser by drawing on a WPF canvas and sending that information to the content API of the web browser control.
If you need an example I can look up some code samples from the application and send them your way.