27 lines
No EOL
647 B
C#
27 lines
No EOL
647 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace LANCommander.Launcher.ViewModels.Components;
|
|
|
|
public partial class GenreCarouselButtomViewModel : ViewModelBase
|
|
{
|
|
[ObservableProperty]
|
|
private string? _backgroundPath;
|
|
|
|
[ObservableProperty]
|
|
private bool _hasBackground;
|
|
|
|
[ObservableProperty]
|
|
private string? _name;
|
|
|
|
public GenreCarouselButtomViewModel()
|
|
{
|
|
}
|
|
|
|
public GenreCarouselButtomViewModel(SDK.Models.Genre genre, string? backgroundPath = null)
|
|
{
|
|
Name = genre.Name;
|
|
|
|
BackgroundPath = backgroundPath;
|
|
HasBackground = !string.IsNullOrEmpty(backgroundPath);
|
|
}
|
|
} |