I've built an app running a CRM website. Everything seems to be working fine except one thing.
When I click on a certain button on screen, it registers the mouseclick but never "load" anything. It display a new html popup on screen, like a div or frame on top of everything but the webbrowser is not seeing it as navigating or anything.
I checked all the events associated with webbrowser and nothing is firing but a new "window" appear on top of everything on the page.
I tried : navigated, documentcompleted, ProgressChanged, StatusTextChanged and DocumentTitleChanged but nothing is registering changes in the webpage.
And I really need to know when the popup and elements are loaded so my app can do some changed...
Related
I'm writing my first mobile Xamarin.Forms app in Visual Studio using ContentPages linked to ViewModels. Everything about the app works as expected - the data comes in from API and gets displayed, navigation works, and the Google AdMob test ad does show up - but the latter only happens once the user has interacted with the page in some way.
I've spent all day reading and trying different things - adding calls to OnAppearing, invoking the PropertyChanged event, assigning visibility, using different methods of inheritance, and nothing has worked so far.
This is what's displayed on page load:
This is what's displayed once I've interacted with the 'Use My Location' button:
So I'm definitely getting an ad, but only after I click something.
The same is true of the content on the About page.
I can also make the ad appear if I change properties of the <ads:AdBanner... /> control in either of the .xaml files. For example, changing the HorizontalOptions property from 'CenterAndExpand' to 'End' in Browse.xaml will cause the ad control to appear. If I then navigate from 'Browse' to 'About' the ad on the About page will not be visible, but if I then change the HorizontalOptions property in the AboutPage.xaml file then the ad control will appear again. If I swap back from 'About' to 'Browse' the ad that was there has now gone again, but will appear if I edit the .xaml.
So, how do I ensure my Google AdMob control is visible all the time, on every page load/appearance?
Found the answer on My AdMob Ad only loading up when I navigate to another page then back
I also had to set the grid row to a fixed height.
Thanks Jawad Ahmed!
I updated the WebBrowser into WebView in winforms application to use Edge browser. But I am facing some problems while updating. Among them, WebBrowser.DocumentCompleted and WebBrowser.Navigatingevents are not found in the new WebView2. I tried NavigationCompleted and NavigationStarting these two events respectively instead of them. But I am facing these problems.
Scrolling on Mouse Wheel is not working. I need to drag the scroll bar to scroll.
Window.location == 'app://language/' (in JavaScript code) is not calling the NavigationStarting events.
How can I get rid of these two problems?
In WebView2 there are two events which help you detect load event:
WebView2.NavigationCompleted → is raised when the WebView has completely loaded (body.onload has been raised) or loading stopped with error.
WebView2.CoreWebView2.DOMContentLoaded → is raised when the initial html document has been parsed. This aligns with the the document's DOMContentLoaded event in html. (This one is available starting from 1.0.705.50.)
We have been experiencing problems using Awesomium in the ADX add in when it is loaded in either the DockRight or DockLeft positions, but not when it is loaded in the ReadingPaneRight (or other non dock positions).
The Awesomium browser fails to display anything and just shows a busy cursor. It also does not fire any events. It is as if it has gone into some loop during startup.
If the form region is dragged to another location (for instance to the right of the message pane) and outlook is restarted, it loads just fine and the pane can be dragged into the DockRight/Left positions.
Is this a known issue? Is there any work around?
I have also asked this question over on the ADX support forums
http://www.add-in-express.com/forum/read.php?FID=5&TID=12055&MID=61413#message61413
I did see this support issue:
http://www.add-in-express.com/forum/read.php?FID=5&TID=11542
But that seemed to be about painting, while this seems to be about loading.
Note that Awesomium does load just fine in a VSTO custom task pane (if that helps at all.)
I've created a sample project here: https://github.com/greenkiwi/AwesomiumADXDockIssue/
This is an example ADX project running Awesomium that fails to display the browser or load anything in either the DockRight or DockLeft positions.
To run this project, you must have both Add-in-express installed and Awesomium and Outlook 2007 or greater (I tested against 2010).
Awesomium
http://www.awesomium.com/
Add-in-express
http://www.add-in-express.com/
Once they are installed, debug the application. The Awesomium window will open in the DockRight position, on my machine, I just get a busy cursor when ever the mouse enters the region, and the page never loads and no events get fired.
If you drag the form into the reading pane area and stop and restart the project, you will see the page load as it should load. The form region can now be dragged to other locations w/o a problem, however, if it is left in the dock right or left positions and outlook is stopped and started, it will stop working.
Please follow the discussion at http://www.add-in-express.com/forum/read.php?FID=5&TID=12055.
In a traditional web browser (Chrome, IE, etc.), I can grab an image and drag it somewhere else, and depending on the application, I can drop the image and something will happen: it will be displayed, opened, saved, etc.
In the application I'm working on, I've added event handlers and code to download and display an image if you drag and drop it onto one of the PictureBoxes on the form. Works great, no problems with that.
For whatever reason, if I load a page in a WebBrowser control, I can't drag images from the page that's loaded. At first I thought maybe I had changed a property of the control that was disabling this functionality, but I created a brand new project with nothing but a WebBrowser on the form and pointed it to a few different pages with images. Even pointing it to a local file with just an img tag in it, I cannot get it to drag images out of the displayed pages. If I select text, I'm able to drag that text out, but no images.
Is there a property I'm missing that I need to set to enable this functionality?
Running in .NET 4 on Win 7 x86 with IE 10 and the registry key to cause the WebBrowser class to use the IE 10 engine. (also tried disabling that and going back to the default IE 7 engine)
Still haven't found an answer to the actual issue, but I found that wrapping my img tag with an anchor with href set to the image path, I can now drag and drop that anchor in the normal way. Drop event handler still manages to get a file path that works, and I have no problem setting the WebBrowser control's AllowNavigation to false. Couple CSS changes and I'm done.
I have a WebBrowser control that is pointed at a website not owned by me. It is a rather slow server and I want to display the wait cursor (mouse pointer) while waiting for page loading. If the navigation is instantiated with the Navigate() method, there is no problem, Navigating and Load_Completed events inform me what is happening. However, if the user navigates by clicking a button, the Navigating event does not "fire". Is there any event (or combination of events/properties) that can be used to this purpose?