Browse Source

Use existing button property definitions

pull/7422/head
robloo 5 years ago
parent
commit
3c8533467d
  1. 12
      src/Avalonia.Controls/SplitButton/SplitButton.cs

12
src/Avalonia.Controls/SplitButton/SplitButton.cs

@ -74,25 +74,21 @@ namespace Avalonia.Controls
/// Defines the <see cref="Command"/> property. /// Defines the <see cref="Command"/> property.
/// </summary> /// </summary>
public static readonly DirectProperty<SplitButton, ICommand> CommandProperty = public static readonly DirectProperty<SplitButton, ICommand> CommandProperty =
AvaloniaProperty.RegisterDirect<SplitButton, ICommand>( Button.CommandProperty.AddOwner<SplitButton>(
nameof(Command),
splitButton => splitButton.Command, splitButton => splitButton.Command,
(splitButton, command) => splitButton.Command = command, (splitButton, command) => splitButton.Command = command);
enableDataValidation: true);
/// <summary> /// <summary>
/// Defines the <see cref="CommandParameter"/> property. /// Defines the <see cref="CommandParameter"/> property.
/// </summary> /// </summary>
public static readonly StyledProperty<object> CommandParameterProperty = public static readonly StyledProperty<object> CommandParameterProperty =
AvaloniaProperty.Register<SplitButton, object>( Button.CommandParameterProperty.AddOwner<SplitButton>();
nameof(CommandParameter));
/// <summary> /// <summary>
/// Defines the <see cref="Flyout"/> property /// Defines the <see cref="Flyout"/> property
/// </summary> /// </summary>
public static readonly StyledProperty<FlyoutBase> FlyoutProperty = public static readonly StyledProperty<FlyoutBase> FlyoutProperty =
AvaloniaProperty.Register<SplitButton, FlyoutBase>( Button.FlyoutProperty.AddOwner<SplitButton>();
nameof(Flyout));
private ICommand _Command; private ICommand _Command;

Loading…
Cancel
Save