diff --git a/winui/ComboBox/Searching.md b/winui/ComboBox/Searching.md index 2bf22fb54..eee0b562e 100644 --- a/winui/ComboBox/Searching.md +++ b/winui/ComboBox/Searching.md @@ -99,6 +99,32 @@ The `ComboBox` control provides support to auto append the text based on data so N> Auto appending of text is supported only in `Editable` mode and `TextSearchMode` property should be `StartsWith`. +## Diacritic aware search + +The `IgnoreDiacritic` option allows string comparison and search operations to treat characters with diacritical marks as equivalent to their base characters. This is useful for search indexing, and user-friendly matching across languages. By default, Diacritic is not considered. Enable or disable the diacritic sensitivity using the `IgnoreDiacritic` property. The following code example demonstrates how to enable the diacritic sensitivity. + +{% tabs %} +{% highlight xaml %} + + + +{% endhighlight %} + +{% highlight C# %} + +comboBox.IgnoreDiacritic = "false"; + +{% endhighlight %} +{% endtabs %} + +![WinUI ComboBox search the items based on Diacritic word/char in the edit field](Searching_images/winui-combobox-diacriticimage.png) + ## Search Mode The `TextSearchMode` property of the `ComboBox` can be used to regulate how the control behaves when it receives user input. The default text searching type is `StartsWith`, ignoring accent and it is case insensitive. The available text search modes are, diff --git a/winui/ComboBox/Searching_images/winui-combobox-diacriticimage.png b/winui/ComboBox/Searching_images/winui-combobox-diacriticimage.png new file mode 100644 index 000000000..ba88c97ca Binary files /dev/null and b/winui/ComboBox/Searching_images/winui-combobox-diacriticimage.png differ diff --git a/winui/ComboBox/Selection.md b/winui/ComboBox/Selection.md index a54db849a..518e50061 100644 --- a/winui/ComboBox/Selection.md +++ b/winui/ComboBox/Selection.md @@ -325,3 +325,38 @@ private async void OnComboBoxSelectionChanged(object sender, ComboBoxSelectionC {% endtabs %} ![WinUI ComboBox selection change notification](Selection_images/winui-combobox-selection-change-notification.png) + +## Selection changing notification + +The `SelectionChanging` event occurs before processing the selection. This is a cancelable event. This argument contains the following information: + + * `AddedItems` - Contains the items that are being selected. + * `RemovedItems` - Contains the items that are being unselected. + * `AllowDetachedSelection` - Gets or sets a value indicating whether the not in list item should be displayed or not. + * `Cancel` - Gets or sets a value that indicates whether the selection should be canceled or not. + + {% tabs %} + + {% highlight xaml %} + + + +{% endhighlight %} + +{% highlight C# %} + +comboBox.SelectionChanging += OnComboBoxSelectionChanging; + +private void OnComboBoxSelectionChanging(object sender, Syncfusion.UI.Xaml.Editors.ComboBoxSelectionChangingEventArgs e) +{ + e.AllowDetachedSelection = true; +} + +{% endhighlight %} + + {% endtabs %}