46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
|
|
namespace dcnsanplanung.wpf.ViewModel
|
|
{
|
|
internal class DesignDynamicGridViewModel : BaseViewModel
|
|
{
|
|
public ObservableCollection<ObservableCollection<ICellViewModel>> Cells { get; } = null;
|
|
public int GridWidth { get; } = 5;
|
|
public int GridHeight { get; } = 5;
|
|
public Color StartColor { get; set; } = Colors.AliceBlue;
|
|
public Color FinishColor { get; set; } = Colors.DarkBlue;
|
|
public Color BorderColor { get; set; } = Colors.DarkGray;
|
|
|
|
public DesignDynamicGridViewModel()
|
|
{
|
|
Cells = new ObservableCollection<ObservableCollection<ICellViewModel>>();
|
|
ICellViewModel cell = new CellViewModel();
|
|
Cells.Add(new ObservableCollection<ICellViewModel>()
|
|
{
|
|
|
|
|
|
});
|
|
}
|
|
}
|
|
|
|
public interface ICellViewModel
|
|
{
|
|
ICell Cell { get; set; }
|
|
ICommand ChangeCellStateCommand { get; }
|
|
}
|
|
public interface ICell
|
|
{
|
|
/// <summary>
|
|
/// State of the cell.
|
|
/// </summary>
|
|
bool State { get; set; }
|
|
}
|
|
}
|