Sending events from add-ins to NAV server
In the next recipe, we will update the web browser control and enrich it with a custom address bar that will change the background color depending on the browser state. Browser control should implement events to communicate its current state to other components. NAV server will subscribe to events and update the address bar accordingly.
Getting ready
The current recipe is based on the project developed in the Developing control add-ins recipe. Complete the walkthrough or copy the source code from the source files accompanying the book.
How to do it...
Run Visual Studio and open the
NavBrowserControl
project created in the Developing control add-ins recipe.For this demo, we will declare two custom event handlers. Insert the following declaration after the
ControlAddIn
event handler:[ApplicationVisible] public event ControlAddInEventHandler BrowserNavigating; [ApplicationVisible] public event ControlAddInEventHandler...