forked from sim0n00ps/OF-DL
25 lines
677 B
C#
25 lines
677 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace OF_DL.Gui.ViewModels;
|
|
|
|
public partial class MultiSelectOptionViewModel : ViewModelBase
|
|
{
|
|
public MultiSelectOptionViewModel(string displayName, string propertyName, bool isSelected, string? helpText = null)
|
|
{
|
|
DisplayName = displayName;
|
|
PropertyName = propertyName;
|
|
IsSelected = isSelected;
|
|
HelpText = helpText?.Trim() ?? string.Empty;
|
|
}
|
|
|
|
public string DisplayName { get; }
|
|
|
|
public string PropertyName { get; }
|
|
|
|
public string HelpText { get; }
|
|
|
|
public bool HasHelpText => !string.IsNullOrWhiteSpace(HelpText);
|
|
|
|
[ObservableProperty] private bool _isSelected;
|
|
}
|