public EditOrDeleteObstacleViewModel() { LeaveOnlySelectedObstacleCommand = new LeaveOnlySelectedObstacleCommand(this); AddProfileCommand = new AddProfileCommand(this); RemoveProfileCommand = new RemoveProfileCommand(this); EditObstacleCommand = new EditObstacleCommand(this); RemoveObstacleCommand = new RemoveObstacleCommand(this); GetObstacles(); var obst = Obstacles.First(); obst.IsSelected = true; SelectedObstacle = obst; }
public ObstacleCreatorViewModel() { AddObstacleCommand = new AddObstacleCommand(this); AddProfileCommand = new AddProfileCommand(this); RemoveProfileCommand = new RemoveProfileCommand(this); if (Colors.Any()) { SelectedColor = Colors.First(); IsSelected = true; } else { IsSelected = false; } }