Browse Source

Fix Click in SplitButton to be nullable

pull/9607/head
robloo 4 years ago
parent
commit
f4827bdfdb
  1. 6
      src/Avalonia.Controls/SplitButton/SplitButton.cs

6
src/Avalonia.Controls/SplitButton/SplitButton.cs

@ -24,7 +24,7 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// Raised when the user presses the primary part of the <see cref="SplitButton"/>. /// Raised when the user presses the primary part of the <see cref="SplitButton"/>.
/// </summary> /// </summary>
public event EventHandler<RoutedEventArgs> Click public event EventHandler<RoutedEventArgs>? Click
{ {
add => AddHandler(ClickEvent, value); add => AddHandler(ClickEvent, value);
remove => RemoveHandler(ClickEvent, value); remove => RemoveHandler(ClickEvent, value);
@ -34,7 +34,9 @@ namespace Avalonia.Controls
/// Defines the <see cref="Click"/> event. /// Defines the <see cref="Click"/> event.
/// </summary> /// </summary>
public static readonly RoutedEvent<RoutedEventArgs> ClickEvent = public static readonly RoutedEvent<RoutedEventArgs> ClickEvent =
RoutedEvent.Register<SplitButton, RoutedEventArgs>(nameof(Click), RoutingStrategies.Bubble); RoutedEvent.Register<SplitButton, RoutedEventArgs>(
nameof(Click),
RoutingStrategies.Bubble);
/// <summary> /// <summary>
/// Defines the <see cref="Command"/> property. /// Defines the <see cref="Command"/> property.

Loading…
Cancel
Save