diff --git a/src/Avalonia.Controls/SplitButton/SplitButton.cs b/src/Avalonia.Controls/SplitButton/SplitButton.cs index 22098961bd..d3450b332f 100644 --- a/src/Avalonia.Controls/SplitButton/SplitButton.cs +++ b/src/Avalonia.Controls/SplitButton/SplitButton.cs @@ -48,9 +48,9 @@ namespace Avalonia.Controls AvaloniaProperty.Register( nameof(CommandParameter)); - /// - /// Defines the property - /// + /// + /// Defines the property + /// public static readonly StyledProperty FlyoutProperty = AvaloniaProperty.Register( nameof(Flyout)); @@ -67,7 +67,7 @@ namespace Avalonia.Controls private PointerType _lastPointerType = PointerType.Mouse; private CompositeDisposable _buttonPropertyChangedDisposable; - private IDisposable _flyoutPropertyChangedDisposable; + private IDisposable _flyoutPropertyChangedDisposable; //////////////////////////////////////////////////////////////////////// // @@ -88,32 +88,32 @@ namespace Avalonia.Controls // //////////////////////////////////////////////////////////////////////// - /// - /// Gets or sets the invoked when the primary part is pressed. - /// - public ICommand Command - { - get => _Command; - set => SetAndRaise(CommandProperty, ref _Command, value); - } - - /// - /// Gets or sets a parameter to be passed to the . - /// - public object CommandParameter - { - get => GetValue(CommandParameterProperty); - set => SetValue(CommandParameterProperty, value); - } - - /// - /// Gets or sets the that is shown when the secondary part is pressed. - /// - public FlyoutBase Flyout - { + /// + /// Gets or sets the invoked when the primary part is pressed. + /// + public ICommand Command + { + get => _Command; + set => SetAndRaise(CommandProperty, ref _Command, value); + } + + /// + /// Gets or sets a parameter to be passed to the . + /// + public object CommandParameter + { + get => GetValue(CommandParameterProperty); + set => SetValue(CommandParameterProperty, value); + } + + /// + /// Gets or sets the that is shown when the secondary part is pressed. + /// + public FlyoutBase Flyout + { get => GetValue(FlyoutProperty); set => SetValue(FlyoutProperty, value); - } + } //////////////////////////////////////////////////////////////////////// // @@ -338,12 +338,12 @@ namespace Avalonia.Controls /// protected override void OnApplyTemplate(TemplateAppliedEventArgs e) - { + { UnregisterEvents(); UnregisterFlyoutEvents(Flyout); - _primaryButton = e.NameScope.Find