WPF - Add AddressChanged event

Typically the address would be databound, there's been a few requests to add an event
so adding one.
This commit is contained in:
amaitland
2020-05-23 20:30:22 +10:00
parent 159ccfc38a
commit 16aa59d6aa
+8
View File
@@ -800,6 +800,7 @@ namespace CefSharp.Wpf
ConsoleMessage = null;
FrameLoadEnd = null;
FrameLoadStart = null;
AddressChanged = null;
IsBrowserInitializedChanged = null;
LoadError = null;
LoadingStateChanged = null;
@@ -1416,6 +1417,11 @@ namespace CefSharp.Wpf
DependencyProperty.Register(nameof(Address), typeof(string), typeof(ChromiumWebBrowser),
new UIPropertyMetadata(null, OnAddressChanged));
/// <summary>
/// Event called when the browser address has changed
/// </summary>
public event DependencyPropertyChangedEventHandler AddressChanged;
/// <summary>
/// Handles the <see cref="E:AddressChanged" /> event.
/// </summary>
@@ -1428,6 +1434,8 @@ namespace CefSharp.Wpf
var newValue = (string)args.NewValue;
owner.OnAddressChanged(oldValue, newValue);
owner.AddressChanged?.Invoke(owner, args);
}
/// <summary>