I want to add my list view items to a array in WPF ? How can i do that?
I added items to list view in this way.
this.ListView1.Items.Add(new MyItem { MenuId = product_id, name = cmb_pname.Text, unitprice = val1, quantity = Convert.ToInt32(txtSaleQty.Text), total = Convert.ToInt32(txt_totalamount.Text) });
But I want to create a array to get the values to that every time I add them to list view.
What I have tried:
this.ListView1.Items.Add(new MyItem { MenuId = product_id, name = cmb_pname.Text, unitprice = val1, quantity = Convert.ToInt32(txtSaleQty.Text), total = Convert.ToInt32(txt_totalamount.Text) });