public ProductCodeWindowViewModel(SainaDbContext uow) { ProductBrandsDropDownOpenedCommand = new RelayCommand(OnProductBrandsDropDownOpened, () => ProductBrands != null && ProductBrands.Any()); ProductTypesDropDownOpenedCommand = new RelayCommand(OnProductTypesDropDownOpened, () => ProductTypes != null && ProductTypes.Any()); ProductModelsDropDownOpenedCommand = new RelayCommand(OnProductModelsDropDownOpened, () => ProductModels != null && ProductModels.Any()); OtherProductsDropDownOpenedCommand = new RelayCommand(OnOtherProductsDropDownOpened, () => OtherProducts != null && OtherProducts.Any()); _uow = uow; ProductBrands = new ObservableCollection <ProductBrand>(); }