diff --git a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs b/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs index a730659330..6a3ac95fca 100644 --- a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs +++ b/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs @@ -103,7 +103,7 @@ namespace Avalonia.Controls.Primitives /// public static readonly RoutedEvent IsSelectedChangedEvent = RoutedEvent.Register( - "IsSelectedChanged", + nameof(IsSelectedChanged), RoutingStrategies.Bubble); /// @@ -139,6 +139,17 @@ namespace Avalonia.Controls.Primitives IsSelectedChangedEvent.AddClassHandler((x, e) => x.ContainerSelectionChanged(e)); } + /// + /// Event that should be raised by items that implement to + /// notify the parent that their selection state + /// has changed. + /// + public event EventHandler? IsSelectedChanged + { + add { AddHandler(IsSelectedChangedEvent, value); } + remove { RemoveHandler(IsSelectedChangedEvent, value); } + } + /// /// Occurs when the control's selection changes. ///