Basic Library for WPF and Silverlight | ComponentOne
WPF and Silverlight Edition Basic Library / Combo Box / ComboBox Quick Start / Step 2 of 4: Adding Items to the ComboBox Control
In This Topic
    Step 2 of 4: Adding Items to the ComboBox Control
    In This Topic

    In the last step, you created a project and added two C1ComboBox controls to it. In this step, you will add three items to the first combo box.

    Complete the following steps:

    1. Select the first C1ComboBox, Category.
    2. In the Properties window, click the Items ellipsis button to open the Collection Editor: Items dialog box.
    3. Click Add three times to add three C1ComboBoxItems to the control. Three C1ComboBoxItems named c1ComboBoxItem1, c1ComboBoxItem2, and c1ComboBoxItem3, are added to the control.
    1. Set c1ComboBoxItem1’s properties as follows:
    • Set the Content property to "Comedy".
    • Set the Height property to "25".
    1. Set c1ComboBoxItem2’s properties as follows:
    • Set the Content property to "Drama".
    • Set the Height property to "25".
    1. Set C1ComboBoxItem3’s properties as follows:
    • Set the Content property to "Science Fiction".
    • Set the Height property to "25".
    1. Click OK to close the Collection Editor: Items dialog box.

    In this step, you added items to the first combo box. In the next step, you will add code to the project that will populate the second combo box with items when a user selects an item in the first combo box.