IWebViewPresenter InterfaceAwesomium.NET 1.7.6Awesomium.NET
This interface defines the members that an IWebView presentation control should implement, if it wants to respond to UI related events, without handling the relative events.

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version: 1.7.6.0
Syntax

public interface IWebViewPresenter : IDisposable

The IWebViewPresenter type exposes the following members.

Methods

  NameDescription
Public methodHidePopupMenu
Called when any drop-down (popup) menus visible, should be hidden.
Public methodHideToolTip
Called when any tool-tips visible, should be hidden.
Public methodPrint
Called when the page requests to print itself. (Usually the result of window.print() being called from JavaScript.)
Public methodShowCertificateErrorDialog
Called when the view asks for a dialog to display an SSL certificate that was encountered while navigating to an address.
Public methodShowChooseFilesDialog
Called when the view asks for a dialog that will select local files.
Public methodShowCursor
Called when the current cursor indicated by the View, changes.
Public methodShowDownloadDialog
Called when the view asks for a dialog that will select the local path to the file to be downloaded.
Public methodShowJSDialog
Called when the view asks for a JavaScript dialog to be presented.
Public methodShowLoginDialog
Called when the view asks for a dialog that will allow the user to provide login info.
Public methodShowPopupMenu
Called when the view asks for a drop-down (popup) menu to be presented.
Public methodShowToolTip
Called when the view asks for a tool-tip to be presented.
Public methodShowWebContextMenu
Called when the view asks for a context menu to be presented.
Public methodShowWebPageInfo
Called when the view asks for web page security information to be presented.
Public methodToggleFullscreenMode
Called when JavaScript code in the page requests fullscreen mode for a particular element, using WebKitFullscreen API.
Top
Properties

  NameDescription
Public propertyView
Gets or sets the IWebView instance this IWebViewPresenter instance is presenting, or is responsible for providing UI logic for.
Top
Remarks

Members of the IWebViewPresenter interface are used by views to propagate UI related requests that they cannot handle by themselves. For example, the windowless  WebView does not handle any UI related events itself. If an IWebViewPresenter has been assigned to the Presenter property, those requests will be propagated to the presentation control, unless previously handled by a relative event handler.
Note Note
When used with an offscreen WebView, an instance of IWebViewPresenter that also implements ISurface, will be used as the view's default surface, as long as it has been assigned to Presenter immediately after the creation of the WebView.

Usage in WPF

The IWebViewPresenter interface is extensively used in WPF. IWebView presentation controls are used in the visual tree when styling a WPF WebControl. These can be custom WPF surfaces implementing ISurface (for offscreen views) or any other control providing custom presentation of a IWebView instance.

When the custom control is added to the visual tree and loaded for presentation, the IWebView instance (typically, a WPF WebControl) uses the IWebViewPresenter interface to communicate with the presentation control.

Awesomium.Windows.Controls already provides 2 such presenters:

Presentation ControlUsage (by the default style)
WebViewPresenter Used when ViewType is set to Offscreen (default). This is an ISurface component that uses 100% WPF logic to copy the view's pixel buffer to a bitmap that it then renders for presentation.
WebViewHost This is an HwndHost that is used when ViewType is set to Window. For more details, read the documentation of WebViewHost.
See Also

Reference