pla-01/Life/ViewModel/CellViewModel.cs
2019-10-26 16:47:08 +02:00

48 lines
944 B
C#

using Life.Misc;
namespace Life.ViewModel
{
public class CellViewModel : BaseViewModel
{
private int _left;
private int _top;
private bool _isAlive;
public CellViewModel(int x, int y)
{
Position = new Position(x, y);
}
public int Left
{
get => _left;
set
{
_left = value;
OnPropertyChanged(nameof(Left));
}
}
public int Top
{
get => _top;
set
{
_top = value;
OnPropertyChanged(nameof(Top));
}
}
public bool IsAlive
{
get => _isAlive;
set
{
_isAlive = value;
OnPropertyChanged(nameof(IsAlive));
}
}
public Position Position { get; }
}
}