public ViewA() { InitializeComponent(); Consumo consumo = new Consumo(); DataContext = new ConsumoViewModel(consumo); }
public ConsumoViewModel(Consumo consumo) { Consumo = new List <Consumo>(); Consumo.Add(consumo); }