Basic Library for WPF and Silverlight | ComponentOne
WPF and Silverlight Edition Basic Library / Combo Box / ComboBox Features / Drop-Down List / Launching with the Drop- Down List Open
In This Topic
    Launching with the Drop- Down List Open
    In This Topic

    To launch the C1ComboBox with its drop-down list open, set the IsDropDownOpen property to True.

    Complete the following steps:

    1. Add IsDropDownOpen="True" to the <c1:C1ComboBox> tag so that the markup resembles the following:
    XAML
    Copy Code
    <c1:C1ComboBox HorizontalAlignment="Left" Width="249" IsDropDownOpen="True">
    
    1. Run the program and observe that the drop-down list is open upon page load.

    Complete the following steps:

    1. Add x:Name="C1ComboBox1" to the <c1:C1ComboBox> tag so that the object will have a unique identifier for you to call in code.
    2. Open the MainPage.xaml.cs or the MainWindow.xaml.cs page.
    3. Add the following code beneath the InitializeComponent() method:
    Visual Basic
    Copy Code
    C1ComboBox1.IsDropDownOpen = True
    

    C#
    Copy Code
    C1ComboBox1.IsDropDownOpen = true;
    
    1. Run the program and observe that the drop-down list is open upon page load.

    Complete the following steps:

    1. Click the C1ComboBox control once to select it.
    2. In the Properties window, select the IsDropDownOpen check box.
    3. Run the program and observe that the drop-down list is open upon page load.