IsTextSearchCaseSensitive Property

ItemsControl.IsTextSearchCaseSensitive Property

.NET Framework 4.6 and 4.5

Gets or sets a value that indicates whether case is a condition when searching for items.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool IsTextSearchCaseSensitive { get; set; }

Property Value

Type: System.Boolean

true if text searches are case-sensitive; otherwise, false.

When the IsTextSearchEnabled property is set to true, the IsTextSearchCaseSensitive property specifies whether the case determines whether an item is selected in an ItemsControl. For example, if an ItemsControl contain two strings that differ only in case, such as "ITEM" and "item", the first string will always be selected, regardless of the case of the input.

The following example creates a ComboBox that contains the strings, "DOG", "CAT", "dog", and "cat". The example binds the IsTextSearchCaseSensitive property to the IsChecked property of a CheckBox. If the check box is selected and the user types "dog", the third item in the ItemsControl is selected. If the user unselects the check box and types "dog", the first item is selected because case is not a condition of the search.

.NET Framework
Available since 4.0
Return to top
© 2015 Microsoft