Not sure if your application is Winforms or WPF. The code below works in a WPF application.
combo1.Items.Add("Item 1"); combo1.Items.Add("Item 2"); combo1.SelectedIndex = 0; combo1.Foreground = Brushes.Black;
In my XAML, I added a combo box and set its IsEnabled property to false, and then in the code I used the code above, and it works.
NTN
Anand shah
source share