Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

DevTool

[email protected] edited this page Nov 29, 2019 · 1 revision

Launching the DevTool

The default ContextMenu handler lets you launch the DevTool if you are in debug mode. However this is customizable. You can either permanently set the mode to debug or register a new context menu handler.

Setting debug mode

ChromelyConfiguration config = ChromelyConfiguration
                              .Create()
                              .WithDebuggingMode(true)
                              //...
CefGlueSchemeHandlerFactory());

Registering a new handler

Both CefSharp and CefGlue come with few default handlers like CefSharpContextMenuHandler for CefSharp, CefGlueContextMenuHandler for CefGllue. These handlers can be replaced with custom handlers and new one can be added. This is done via registering custom handling using RegisterCustomHandler.

This will require setting:

  • Key - that can be found at - CefHandlerKey.
  • The value to be set. This has to be valid handler class. It MUST inherit from CefSharp, CefGlue provided handler base classes or interfaces.

To register a new ContextMenu handler you do the following:

ChromelyConfiguration config = ChromelyConfiguration
                              .Create()
                              //...
                             .RegisterCustomHandler(CefHandlerKey.ContextMenuHandler, typeof(CustomContextMenuHandler));
                              //...

Screenshots

image

image

Clone this wiki locally