ComboBox.IsTextSearchEnabled Property

Definition

Gets or sets a value that specifies whether a user can jump to a value by typing.

public:
 property bool IsTextSearchEnabled { bool get(); void set(bool value); };
bool IsTextSearchEnabled();

void IsTextSearchEnabled(bool value);
public bool IsTextSearchEnabled { get; set; }
var boolean = comboBox.isTextSearchEnabled;
comboBox.isTextSearchEnabled = boolean;
Public Property IsTextSearchEnabled As Boolean
<ComboBox IsTextSearchEnabled="bool"/>

Property Value

Boolean

bool

true if a user can jump to a value by typing; otherwise, false. The default is true.

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

Starting in Windows 10, version 1607, ComboBox introduces a text search feature. By default, the ComboBox jumps to a relevant value as the user types. You can set the IsTextSearchEnabled property to false to disable this behavior. This is useful, for example, if you have extended ComboBox with custom text search.

Version compatibility

The IsTextSearchEnabled property is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.

Note

The text search feature is available when your app is compiled for Windows 10, version 1607 and running on version 1607 (or later). It is not available when your app is compiled for a previous version or is running on a previous version.

To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.

<ComboBox x:Name="comboBox1" Loaded="ComboBox_Loaded"/>
private void ComboBox_Loaded(object sender, RoutedEventArgs e)
{
    if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.ComboBox", "IsTextSearchEnabled"))
    {
        comboBox1.IsTextSearchEnabled = false;
    }
}

Applies to