1using System.Windows.Input;
5 internal static class ButtonElement
10 public static readonly BindableProperty CommandProperty = BindableProperty.Create(
11 nameof(IButtonElement.Command), typeof(ICommand), typeof(IButtonElement),
null,
12 propertyChanging: CommandElement.OnCommandChanging, propertyChanged: CommandElement.OnCommandChanged);
17 public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create(
18 nameof(IButtonElement.CommandParameter), typeof(
object), typeof(IButtonElement),
null,
19 propertyChanged: CommandElement.OnCommandParameterChanged);
24 public const string PressedVisualState =
"Pressed";
32 public static void ElementClicked(VisualElement VisualElement, IButtonElement ButtonElementManager)
34 if (VisualElement.IsEnabled ==
true)
36 ButtonElementManager.Command?.Execute(ButtonElementManager.CommandParameter);
37 ButtonElementManager.PropagateUpClicked();