public MainWindow(AutomotoraCollection coleccion) { this._coleccion = coleccion; InitializeComponent(); //ItemsSource receives and then displays a list of elements coming from a Enum. ( Enum Marcas ) cboMarca.ItemsSource = Enum.GetValues(typeof(Marcas)); cboMarca.SelectedIndex = 0; }
//Parameterized constructor public ListadoAutomoviles(AutomotoraCollection coleccion) { this.Coleccion = coleccion; InitializeComponent(); dgAutomoviles.ItemsSource = this.Coleccion.automoviles; //Load cboMarca cboMarca.ItemsSource = Enum.GetValues(typeof(Marcas)); }