public void loadComboBoxModelsByBrandsAndCategory(ComboBox combo, string Category, string Brand, bool sort = true) { if (!sort) { combo.ItemsSource = sql.getModelByCategoryAndBrand(Category, Brand); } else { tmp = sql.getModelByCategoryAndBrand(Category, Brand); tmp.Sort(); combo.ItemsSource = tmp; } }