Click or drag to resize

ChromiumWebBrowser Events

Version 94.4.20

The ChromiumWebBrowser type exposes the following members.

Events
  NameDescription
Public eventAddressChanged
Occurs when the browser address changed. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. (The exception to this is when you're running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread).
Public eventBrowserInitialized
Event called after the underlying CEF browser instance has been created. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. (The exception to this is when you're running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread).
Public eventConsoleMessage
Event handler for receiving Javascript console messages being sent from web pages. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. (The exception to this is when you're running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread).
Public eventFrameLoadEnd
Event handler that will get called when the browser is done loading a frame. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This method will always be called for all frames irrespective of whether the request completes successfully. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread.
Public eventFrameLoadStart
Event handler that will get called when the browser begins loading a frame. Multiple frames may be loading at the same time. Sub-frames may start or continue loading after the main frame load has ended. This method may not be called for a particular frame if the load request for that frame fails. For notification of overall browser load status use OnLoadingStateChange instead. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread.
Public eventJavascriptMessageReceived
Event handler that will get called when the message that originates from CefSharp.PostMessage
Public eventLoadError
Event handler that will get called when the resource load for a navigation fails or is canceled. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread.
Public eventLoadingStateChanged
Event handler that will get called when the Loading state has changed. This event will be fired twice. Once when loading is initiated either programmatically or by user action, and once when loading is terminated due to completion, cancellation of failure. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread.
Public eventPaint
Fired on the CEF UI thread, which by default is not the same as your application main thread. Called when an element should be painted. Pixel values passed to this method are scaled relative to view coordinates based on the value of ScreenInfo.DeviceScaleFactor returned from GetScreenInfo.
Public eventStatusMessage
Event handler for changes to the status message. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. (The exception to this is when you're running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread).
Public eventTitleChanged
Occurs when [title changed]. It's important to note this event is fired on a CEF UI thread, which by default is not the same as your application UI thread. It is unwise to block on this thread for any length of time as your browser will become unresponsive and/or hang.. To access UI elements you'll need to Invoke/Dispatch onto the UI Thread. (The exception to this is when you're running with settings.MultiThreadedMessageLoop = false, then they'll be the same thread).
Top
See Also