private void ChangeProductList(Product product) { if (product == null) { return; } _materials = MaterialsService.GetMaterialsByProductId(product.Id); MaterialDataGrid.ItemsSource = null; MaterialDataGrid.ItemsSource = _materials; IdLabel.Content = product.CodeProduct; IdLabel.ToolTip = product.CodeProduct; NameLabel.Content = product.Name; NameLabel.ToolTip = product.Name; DesignationLabel.Content = product.Mark; DesignationLabel.ToolTip = product.Mark; CopyMaterialButton.IsEnabled = true; AddMaterialButton.IsEnabled = true; }