CefSharp.wpf web browser navigated event (C# .Net)

10,825

The ChromiumWebBrowser has a LoadingStateChanged event with LoadingStateChangedArgs, which has an IsLoading property. It also has a FrameLoadEnd event, which is raised when a frame in the page finishes loading.

Share:
10,825
Ali Baig
Author by

Ali Baig

I am senior software developer (C# .Net/Angular) currently working in ASP.NET MVC/Core, WebAPI 2.0, EF, Angular and contributing to stackoverflow's community in my free time. Skype: baigali93

Updated on June 04, 2022

Comments

  • Ali Baig
    Ali Baig almost 2 years

    Is it possible to hook up an event like Navigated with the Webbrowser control (built-in)? I need to perform oAuth in a desktop application and there i need to know if the authentication code has been added to the redirect_uri.

    I was using WebBrowser control that is built in and has the events like Navigating and Navigated but i was facing an issue regarding ieframe.dll/navcancl.htm so i decided to go with CefSharp.wpf ChromiumWebBrowser but I'm not being able to locate any events that can be called when the browser has finished navigating to the URL.

    This is what i have done in the xaml

     <wpf:ChromiumWebBrowser Grid.Row="0" Grid.Column="0"
            x:Name="ChromiumBrowser"
            WebBrowser="{Binding WebBrowser, Mode=OneWayToSource}" FrameLoadStart="ChromiumBrowser_OnFrameLoadStart"
            Title="{Binding Title, Mode=TwoWay}" />
    

    and when the user requests to authenticate, I'm setting the address like

    ChromiumBrowser.Address = NavigateUrl
    
  • amaitland
    amaitland over 8 years
    In the current release the event is called NavStateChanged, in the upcoming 43 release it has been renamed to LoadingStateChanged to keep things inline with the upstream CEF project. github.com/cefsharp/CefSharp/blob/cefsharp/41/CefSharp/…
  • amaitland
    amaitland over 8 years
    For reference the current stable release is 41.0.1
  • Ali Baig
    Ali Baig over 8 years
    I installed it from Nuget and its v43 (prerelease) so i can see the changes already @amaitland :)