i am working on program on windows forms I have a listbox and I am validating data I want the correct data be added to the listbox with color green while the invalid data ad
How about
MyLB is a listbox Label ll = new Label(); ll.Width = MyLB.Width; ll.Content = ss; if(//////) ll.Background = Brushes.LightGreen; else ll.Background = Brushes.LightPink; MyLB.Items.Add(ll);