Files
cfs-Tracker/ViewModels/MonthSectionViewModel.cs
2026-10-11 22:19:34 +02:00

35 lines
761 B
C#

using CommunityToolkit.Mvvm.ComponentModel;
using System.Collections.ObjectModel;
namespace cfs_tracker.ViewModels;
public partial class MonthSectionViewModel : ObservableObject
{
private string _title = string.Empty;
private bool _isLoading = true;
public string Title
{
get => _title;
set => SetProperty(ref _title, value);
}
public bool IsLoading
{
get => _isLoading;
set => SetProperty(ref _isLoading, value);
}
public ObservableCollection<MonthCellViewModel> Cells { get; } = new();
public void ReplaceCells(IEnumerable<MonthCellViewModel> cells)
{
Cells.Clear();
foreach (var cell in cells)
Cells.Add(cell);
IsLoading = false;
}
}