I'm trying to capture the address change event in a ChromiumWebBrowser control within a Caliburn.Micro ViewModel, but I'm facing issues where the AddressChanged event isn't firing as expected. I've attempted to bind it using Caliburn's conventions but haven't had success so far.
Here's a simplified version of what I've tried:
In the XAML:
<wpf:ChromiumWebBrowser x:Name="ChromiumWebBrowser"
Address="http://www.google.de"
cm:Message.Attach="[Event AddressChanged] = [Action FireAddressChanged($source, $eventArgs)]">
in the ViewModel:
public void FireAddressChanged(object sender, AddressChangedEventArgs e)
{
Debug.Print(e.Address);
}
Strange is, if I replace the
[Event AddressChanged]
with something like
[Event MouseDoubleClick]
the method get called (and it will threw an exception because of the eventargs, but this is not the problem).