Adding ComboBox Items in XAML

In this topic, you will learn how to add items to the C1ComboBox control in XAML markup. This method is useful whenever you're creating a static combo box with just a few items.

Complete the following steps:

1.   To add items to the C1ComboBox control, add the following XAML markup between the <c1:C1ComboBox> and </c1:C1ComboBox> tags:

 

<c1:C1ComboBoxItem Height="25" Content="C1ComboBoxItem"/>

<c1:C1ComboBoxItem Height="25" Content="C1ComboBoxItem"/>

<c1:C1ComboBoxItem Height="25" Content="C1ComboBoxItem"/>

<c1:C1ComboBoxItem Height="25" Content="C1ComboBoxItem"/>

 

2.   Run the program.

3.   Click the drop-down arrow and observe that four items appear in the drop-down list. The result resembles the following image:

 This Topic Illustrates the Following:

With the program running, click the drop-down arrow and observe that four items appear in the drop-down list. The result resembles the following image:

 

AddingItemsInXaml.png


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