Files
Hyperbar/Hyperbar.Widget/WidgetMenuViewModel.cs
T
TheXamlGuy 565c6866d8 wip
2024-02-10 20:19:01 +00:00

28 lines
776 B
C#

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace Hyperbar.Widget;
[NotificationHandler(nameof(Id))]
public partial class WidgetMenuViewModel(IServiceProvider serviceProvider,
IServiceFactory serviceFactory,
IPublisher publisher,
ISubscriber subscriber,
IDisposer disposer,
Guid id = default,
string? text = null,
string? icon = null,
RelayCommand? command = null) : WidgetComponentViewModel(serviceProvider, serviceFactory, publisher, subscriber, disposer)
{
[ObservableProperty]
private IRelayCommand? click = command;
[ObservableProperty]
private string? icon = icon;
[ObservableProperty]
private Guid id = id;
[ObservableProperty]
private string? text = text;
}