public CarUserControl(string model, CarBodyTypes type, int maxSpeed, Brush brush) : this() { Model = model; Type = type; MaxSpeed = maxSpeed; Color = brush; }
public void AddCar(string model, CarBodyTypes type, int maxSpeed, Brush brush) { _carListViewModel.Items.Add(new CarUserControl(model, type, maxSpeed, brush)); DataContext = null; DataContext = _carListViewModel; }