In the loop I create n-buttons, and by clicking on each button, the data in the listView should be added. The code works, but the UI itself is not updated for some reason.
List<Bludo> cash = new List<Bludo>(); Button btn = new Button(); btn.Click += delegate { Bludo bl = new Bludo(); var data = btn.Tag.ToString().Split(';'); bl.tsena = Convert.ToDouble(data[0]); bl.bludo = data[1]; cash.Add(bl); listView.ItemsSource = cash; listView.UpdateLayout(); };
cash? If it is not anObservableCollection, it will not work. - VladD