public Bill(deliveryOrder d) { InitializeComponent(); addresslabel.Visibility = Visibility.Visible; addresstxt.Visibility = Visibility.Visible; int total = d.items.Count; int i = 0; foreach (Menu m in d.items) { string item; if (d.readNote(i) != "none") { item = string.Join(" - ", m.Description, d.readNote(i)); } else { item = m.Description; } billlist.Items.Add(item); i++; } subtotallabel.Content = Math.Round(d.Paid, 2); deliv_chargelabel.Content = Math.Round((d.Paid * 0.15), 2); totallabel.Content = Math.Round((d.Paid + (d.Paid * 0.15)), 2); serverlabel.Content = d.Server; name_tablelabel.Content = "Name:"; name_tablecontentlabel.Content = d.Name; addresstxt.Content = d.Address; }