Step 3 of 4: Adding Code to the Control

In the last step, you added items to the first combo box. In this step, you will add code to the project that will populate the second combo box according to the option the user selects in the first combo box.

1.   Select the first C1ComboBox control (“Category”).

2.   In the Properties window, click the Events button.

3.   Double-click the inside the SelectedIndexChanged text box to add the C1ComboBox1_SelectedIndexChanged event handler.

The MainPage.xaml.cs page opens.

4.   Import the following namespace into your project:

      Visual Basic

      C#

5.   Add the following code to the C1ComboBox1_SelectedIndexChanged event handler:

      Visual Basic

      C#

In the next step, you will run the project and observe the results of this quick start.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.