IWebViewCreateInspectorView Method (Boolean)Awesomium.NET 1.7.6Awesomium.NET
Requests the creation of a special Developer Tools Inspector View, that inspects the web contents of this view.

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

void CreateInspectorView(
	bool docked = false


docked (Optional)
Type: SystemBoolean
Specifies if the Developer Tools frontend layout, should initially appear as docked. (Default: false)

InvalidOperationException The member is called on an invalid view. (See: IsLive)
InvalidOperationException A Developer Tools Inspector view, is already associated with this view. Dispose it before you create another.

An Inspector View is a special IWebView instance dedicated to loading the Awesomium Developer Tools to inspect the contents of another IWebView, locally. Inspector Views are associated with the view they inspect and they provide specific API that allows users interact with the Developer Tools frontend.
Note Note
Inspector Views do not require activating remote debugging when initializing the WebCore (see: RemoteDebuggingHost and RemoteDebuggingPort).


The following list presents details for creating and wrapping an Inspector View:
  • To create a Developer Tools IWebView instance, use either WebCore.CreateInspectorView, IWebView.CreateInspectorView or the Inspect menu item of the context-menu of a technology-specific WebControl, any time after the inspected view goes live (see: IsLive).
  • WebCore.CreateInspectorView immediately creates and returns a WebView component of the specified type. If a WebViewType is not specified, the type of the inspected view is used.
  • Both IWebView.CreateInspectorView and the Inspect menu item of the context-menu of a technology-specific WebControl, create a native Inspector View and trigger the ShowCreatedWebView event on the inspected view, allowing you to wrap the new Inspector View with a WebView or a technology-specific WebControl (see: NewViewInstance).
  • When ShowCreatedWebView is fired for a newly created Inspector View, IsInspectorView and IsPopup both return true.
  • Both WebCore.CreateInspectorView and IWebView.CreateInspectorView allow you to specify a WebSession instance that can be used for saving Inspector View session settings. If no session is specified, the default in-memory session will be used with the new Inspector View (see: IsDefault).
    Caution note Caution
    The WebSession instance specified, must be created with default preferences (see: Default).
  • Both WebCore.CreateInspectorView and IWebView.CreateInspectorView allow you to specify a boolean parameter (docked) indicating if the Developer Tools frontend UI should initially appear as docked. The value specified for docked with IWebView.CreateInspectorView, is reflected at IsInspectorViewDocked when ShowCreatedWebView is fired. Depending on the value, you should wrap the view and present it in either a standalone window of tool-window style or in a docked window or control near the inspected IWebView instance, without any address-box or navigation buttons.
  • Technology-specific WebControls can specify a WebSession to be used with new Inspector Views by using dedicated WebSessionProvider components (see: InspectorWebSessionProviderResourceKey in WPF and the WebSessionProvider.IsInspectorViewWebSessionProvider property in both WPF and Windows Forms).

    Likewise, WPF applications can specify the default value of the docked parameter for new Inspector Views, by setting the CommandParameter property of the MenuItem assigned to the CreateInspectorView command, to true or false in XAML.

  • The CreatingInspectorView event is always fired prior to the creation of an Inspector View. This allows inspected views set initialization parameters for the new Inspector View. This event can prove useful in scenarios where the creation of an Inspector View is not directly initiated by user code related to the inspected view. For details, read the documentation of the CreatingInspectorView event.


To interact with the Developer Tools frontend loaded by an Inspector View, acquire the IWebViewInspector service by calling GetService(Type) on the Inspector View.

The IWebViewInspector service provides methods and events that allow you to control the Developer Tools UI and monitor user actions on the Inspector View or the inspected IWebView instance.


Developer Tools Inspector IWebView instances allow a minimum set of operations to be performed on them. The following list presents operations that cannot be performed on a Developer Tools Inspector view:

More Details


You should dispose an Inspector View (and optionally its associated WebSession), just like any other IWebView when you're done with it. The following list indicates when an Inspector View falls out of use and therefore its container should be closed and the Inspector View be disposed:
  • When its containing standalone tool-window is closed.
  • When the CloseInspectorView event is fired in response to the user asking to close a docked Inspector View by clicking the Close button on the Developer Tools frontend.
  • When the InspectedViewClosing event is fired indicating that the inspected view has been disposed.
See Also