Basic Library for WPF and Silverlight | ComponentOne
WPF and Silverlight Edition Basic Library / Combo Box / ComboBox Features / Auto Complete
In This Topic
    Auto Complete
    In This Topic

    The C1ComboBox control features an auto-completion feature, which selects a list item based on user input. As the user types, the list item is loaded into the selection box, as seen in the following image:

     

    The user only has to press ENTER to select the list item suggested by the AutoComplete feature.

    The AutoComplete feature can be disabled by setting the AutoComplete property to False. You can set this property in XAML markup, in Code, or in the Designer:

    To disable AutoComplete, add AutoComplete="False" to the <c1:C1ComboBox> tag so that the markup resembles the following:

    XAML
    Copy Code
    <c1:C1ComboBox HorizontalAlignment="Left" Width="249" AutoComplete="False">
    

    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.AutoComplete = False
    

    C#
    Copy Code
    C1ComboBox1.AutoComplete = false;
    
    1. Run the program.

    Complete the following steps:

    1. Click the C1ComboBox control once to select it.
    2. In the Properties window, clear the AutoComplete check box.