Loading...
Loading...
Implement Syncfusion WPF ComboBoxAdv with multiselection, editable support, autocomplete, data binding, and token features. Use this when working with dropdown selection, multiselect dropdowns, editable dropdowns, or autocomplete in WPF. Covers tokens, watermarks, delimiters, custom item templates, and dropdown behavior configuration.
npx skill4agent add syncfusion/wpf-ui-components-skills syncfusion-wpf-comboboxComboBoxAdvSyncfusion.Windows.Tools.Controls.ComboBoxAdvSyncfusion.Windows.Tools.ControlsSyncfusion.Shared.WPFhttp://schemas.syncfusion.com/wpf<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:syncfusion="http://schemas.syncfusion.com/wpf">
<Grid>
<syncfusion:ComboBoxAdv Height="30" Width="200"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<syncfusion:ComboBoxItemAdv Content="Denmark" />
<syncfusion:ComboBoxItemAdv Content="New Zealand" />
<syncfusion:ComboBoxItemAdv Content="Canada" />
<syncfusion:ComboBoxItemAdv Content="Russia" />
<syncfusion:ComboBoxItemAdv Content="Japan" />
</syncfusion:ComboBoxAdv>
</Grid>
</Window>// Model
public class Country
{
public string Name { get; set; }
public string Code { get; set; }
}
// ViewModel
public class ViewModel : INotifyPropertyChanged
{
private ObservableCollection<Country> countries;
public ObservableCollection<Country> Countries
{
get { return countries; }
set { countries = value; OnPropertyChanged(nameof(Countries)); }
}
public ViewModel()
{
Countries = new ObservableCollection<Country>
{
new Country { Name = "Denmark", Code = "DK" },
new Country { Name = "New Zealand", Code = "NZ" },
new Country { Name = "Canada", Code = "CA" }
};
}
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string name) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}<Window.DataContext>
<local:ViewModel />
</Window.DataContext>
<syncfusion:ComboBoxAdv ItemsSource="{Binding Countries}"
DisplayMemberPath="Name"
Height="30" Width="200"/><syncfusion:ComboBoxAdv AllowMultiSelect="True"
IsEditable="True"
EnableToken="True"
ItemsSource="{Binding Items}"
DisplayMemberPath="Name"
Height="Auto" Width="300"/><syncfusion:ComboBoxAdv IsEditable="True"
AutoCompleteMode="Suggest"
ItemsSource="{Binding Items}"
DisplayMemberPath="Name"
Height="30" Width="200"/><syncfusion:ComboBoxAdv AllowMultiSelect="True"
DefaultText="Select items..."
SelectedValueDelimiter=" | "
ItemsSource="{Binding Items}"
DisplayMemberPath="Name"
Height="30" Width="300"/><syncfusion:ComboBoxAdv AllowMultiSelect="True"
AllowSelectAll="True"
EnableOKCancel="True"
ItemsSource="{Binding Items}"
DisplayMemberPath="Name"
Height="30" Width="250"/>| Property | Type | Description |
|---|---|---|
| bool | Enables multiple item selection |
| bool | Allows text input and editing |
| bool | Displays selected items as tokens (multiselect) |
| AutoCompleModes | Suggest or None for autocomplete |
| string | Watermark text when no item selected |
| string | Separator between selected items |
| IEnumerable | Data collection for binding |
| string | Property path for item display |
| object | Currently selected item |
| ObservableCollection<object> | Collection of selected items (multiselect) |
| int | Index of selected item |
| bool | Shows OK/Cancel buttons in dropdown |
| bool | Adds "Select All" option |