Wire up secondary commands for settings etc
This commit is contained in:
@@ -1,17 +1,26 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Hyperbar.Windows;
|
||||
|
||||
namespace Hyperbar.Widget;
|
||||
|
||||
public partial class SecondaryViewModel(ITemplateFactory templateFactory,
|
||||
IServiceFactory serviceFactory,
|
||||
IMediator mediator,
|
||||
IDisposer disposer,
|
||||
int index) :
|
||||
ObservableCollectionViewModel<IDisposable>(serviceFactory, mediator, disposer),
|
||||
public partial class SecondaryViewModel :
|
||||
ObservableCollectionViewModel<IDisposable>,
|
||||
ITemplatedViewModel
|
||||
{
|
||||
[ObservableProperty]
|
||||
private int index = index;
|
||||
private int index;
|
||||
|
||||
public ITemplateFactory TemplateFactory => templateFactory;
|
||||
public SecondaryViewModel(ITemplateFactory templateFactory,
|
||||
IServiceFactory serviceFactory,
|
||||
IMediator mediator,
|
||||
IDisposer disposer,
|
||||
int index) : base(serviceFactory, mediator, disposer)
|
||||
{
|
||||
this.index = index;
|
||||
this.TemplateFactory = templateFactory;
|
||||
|
||||
Add<SettingsButtonViewModel>();
|
||||
}
|
||||
|
||||
public ITemplateFactory TemplateFactory { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user