C# – How to set CheckedListBox items to checked by default

c++checkedlistboxvisual-studio-2013winforms

Is there an option in Visual Studio to set all items in a CheckedListBox to checked by default? By this I mean I would like all items to be checked upon start up, and the user can unselect items as needed.

If not, is my only option to set all items to checked programatically inside the constructor?

Best Solution

You can do it programmatically after populating the Items

for (int i = 0; i < checkedListBox.Items.Count; i++)
{
    checkedListBox.SetItemChecked(i, true);
}