//Caluclates total by adding all the orders which were passed and added to the list private void Button_Click(object sender, RoutedEventArgs e) { double total = 0; foreach (StoreGoods items in newItemList) { total += items.PurchasePrice * items.Quantity; } StoreGoods finalOrder = new StoreGoods(); subtotalTxt.Text = "$" + total.ToString(); taxTxt.Text = finalOrder.calculateTax(total).ToString(); grandTotalTxt.Text = finalOrder.calculateGrandTotal(total).ToString(); }