ItemsControl::IsTextSearchCaseSensitive Property
Gets or sets a value that indicates whether case is a condition when searching for items.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
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.
<StackPanel> <CheckBox Content="_Case sensitive Search" IsChecked="True" Name="caseSensitiveSearch"/> <ComboBox IsEditable="True" IsTextSearchCaseSensitive="{Binding ElementName=caseSensitiveSearch, Path=IsChecked}"> <ComboBoxItem>DOG</ComboBoxItem> <ComboBoxItem>CAT</ComboBoxItem> <ComboBoxItem>dog</ComboBoxItem> <ComboBoxItem>cat</ComboBoxItem> </ComboBox> </StackPanel>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.