Can we add the items in the combobox located on the window form dynamically ? Like there are 7 combobox on the window form and when the application is run user should be able to add the item(s) in the combobox.And items added by user should be permanent in the combobox.
Sure, just use the Items
collection:
comboBox1.Items.Add(...);
And they are permanent in the way that they persist until the combo box ceases to live. If you want to retain the items through application shutdown or closing the form then you'll need to do that yourself.
You can also bind the combo box to a collection you're keeping elsewhere with the ItemsSource
property. But you'll still need to take care of saving and loading the collection contents as needed.
You may want to elaborate a bit on what exactly you expect and need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With