In This Topic
By default, the C1ComboBox control's drop-down list is only revealed when a user clicks the drop-down arrow. In this topic, you will write code that will cause the drop-down list to open whenever a user hovers over the control.
Complete the following:
- In Design View, add x:Name="C1ComboBox1" to the <c1:C1ComboBox> tag so that the object will have a unique identifier for you to call in code.
- Click the C1ComboBox control to select it.
- In the Properties panel, click the Events button to reveal the control's list of events.
- Double-click inside of the MouseEnter text box. This will add the C1ComboBox_MouseEnter event handler to Code view.
- Add the following code to the C1ComboBox1_MouseEnter event handler:
Visual Basic |
Copy Code
|
C1ComboBox1.IsDropDownOpen = True
|
C# |
Copy Code
|
C1ComboBox1.IsDropDownOpen = true;
|
- Run the program. Hover over the C1ComboBox control with your cursor. Observe that the drop-down list appears when you hover over the control. The drop-down list will stay open until you either select an item or click outside of the control.