27 lines
733 B
C#
27 lines
733 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
namespace Hyperbar.Widget;
|
|
|
|
[NotificationHandler(nameof(Id))]
|
|
public partial class WidgetMenuViewModel(IServiceFactory serviceFactory,
|
|
IMediator mediator,
|
|
IDisposer disposer,
|
|
ITemplateFactory templateFactory,
|
|
Guid id = default,
|
|
string? text = null,
|
|
string? icon = null,
|
|
RelayCommand? command = null) : WidgetComponentViewModel(serviceFactory, mediator, disposer, templateFactory)
|
|
{
|
|
[ObservableProperty]
|
|
private IRelayCommand? click = command;
|
|
|
|
[ObservableProperty]
|
|
private string? icon = icon;
|
|
|
|
[ObservableProperty]
|
|
private Guid id = id;
|
|
|
|
[ObservableProperty]
|
|
private string? text = text;
|
|
} |