forked from WalletWasabi/WalletWasabi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a2dfad
commit a5e3eda
Showing
3 changed files
with
59 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using Avalonia; | ||
using System.Windows.Input; | ||
|
||
namespace WalletWasabi.Fluent.Controls; | ||
|
||
public class UICommand : AvaloniaObject, IUICommand | ||
{ | ||
public static readonly StyledProperty<string> NameProperty = | ||
AvaloniaProperty.Register<UICommand, string>(nameof(Name)); | ||
|
||
public static readonly StyledProperty<object> IconProperty = | ||
AvaloniaProperty.Register<UICommand, object>(nameof(Icon)); | ||
|
||
public static readonly StyledProperty<ICommand> CommandProperty = | ||
AvaloniaProperty.Register<UICommand, ICommand>(nameof(Command)); | ||
|
||
public static readonly StyledProperty<bool> IsDefaultProperty = | ||
AvaloniaProperty.Register<UICommand, bool>(nameof(IsDefault)); | ||
|
||
public string Name | ||
{ | ||
get => GetValue(NameProperty); | ||
set => SetValue(NameProperty, value); | ||
} | ||
|
||
public object Icon | ||
{ | ||
get => GetValue(IconProperty); | ||
set => SetValue(IconProperty, value); | ||
} | ||
|
||
public ICommand Command | ||
{ | ||
get => GetValue(CommandProperty); | ||
set => SetValue(CommandProperty, value); | ||
} | ||
|
||
public bool IsDefault | ||
{ | ||
get => GetValue(IsDefaultProperty); | ||
set => SetValue(IsDefaultProperty, value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters