29 lines
846 B
C#
29 lines
846 B
C#
using System.Windows.Input;
|
|
|
|
namespace ytLive.ViewModels;
|
|
|
|
/// <summary>
|
|
/// One Add-Source menu entry: a label, its action, and an optional command
|
|
/// parameter. The collection is rebuilt per scene from
|
|
/// <see cref="Services.SceneAccessPolicy"/> so only the sources the active
|
|
/// scene allows appear in the menu.
|
|
/// </summary>
|
|
public sealed class SourceMenuItem
|
|
{
|
|
public SourceMenuItem(string header, ICommand command, object? parameter = null,
|
|
bool isEnabled = true, string? toolTip = null)
|
|
{
|
|
Header = header;
|
|
Command = command;
|
|
Parameter = parameter;
|
|
IsEnabled = isEnabled;
|
|
ToolTip = toolTip;
|
|
}
|
|
|
|
public string Header { get; }
|
|
public ICommand Command { get; }
|
|
public object? Parameter { get; }
|
|
public bool IsEnabled { get; }
|
|
public string? ToolTip { get; }
|
|
}
|