2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This article describes how to filter dropdown items in WPF editable ComboBoxAdv. MainWindow.xaml<Grid> <syncfusion:ComboBoxAdv x:Name="comboBoxAdv" HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="25" ItemsSource="{Binding List}" DisplayMemberPath="Name" IsEditable="True"> <i:Interaction.Triggers> <i:EventTrigger EventName="KeyUp"> <local:FilterAction/> </i:EventTrigger> </i:Interaction.Triggers> </syncfusion:ComboBoxAdv> </Grid> In the below code to filter the ComboBoxAdv collectionview itemsource based on obtained ComboBoxAdv text. public class FilterAction : TargetedTriggerAction<ComboBoxAdv> { protected override void Invoke(object parameter) { CollectionView items = (CollectionView)CollectionViewSource.GetDefaultView(Target.ItemsSource); items.Filter = ((o) => { if (String.IsNullOrEmpty(Target.Text)) return true; else { if ((o as Model).Name.Contains(Target.Text)) return true; else return false; } }); items.Refresh(); } } The output for the above code is shown below |
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.