public PrimalCutsList(IList <PrimalCut> primalCuts, CustomerBagGrid owner) { _owner = owner; InitializeComponent(); PrimalCuts.ItemsSource = primalCuts.OrderBy(x => x.SortOrder); PrimalCutsWindow.Height = (primalCuts.Count / 7 + 1) * 120; PrimalCutsWindow.MaxHeight = (primalCuts.Count / 7 + 1) * 120; }
public OrderProducts(List <CutItem> cutProducts, CustomerBagGrid customerBagGrid) { InitializeComponent(); OrderProductsWindow.Height = 150 + cutProducts.Count * 55; OrderProductsWindow.MaxHeight = 150 + ((cutProducts.Count / 3) + 1) * 50; CutProducts = cutProducts; _customerBagGrid = customerBagGrid; Products.ItemsSource = cutProducts; }