Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (151).NET Core  (25)Angular  (49)ASP.NET  (48)ASP.NET Core  (64)ASP.NET MVC  (86)Azure  (28)Blazor  (96)DocIO  (20)Essential JS 2  (71)Essential Studio  (163)File Formats  (20)Flutter  (109)JavaScript  (148)Microsoft  (101)PDF  (59)React  (33)Succinctly series  (122)Syncfusion  (479)TypeScript  (30)Uno Platform  (3)UWP  (4)Vue  (26)Webinar  (25)Windows Forms  (55)WinUI  (20)WPF  (121)Xamarin  (130)XlsIO  (24)Other CategoriesBarcode  (4)BI  (29)Bold BI  (3)Build conference  (6)Business intelligence  (53)Button  (4)C#  (107)Chart  (50)Cloud  (9)Company  (445)Dashboard  (6)Data Science  (3)Data Validation  (5)DataGrid  (47)Development  (257)Doc  (7)DockingManager  (1)eBook  (93)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (20)Extensions  (13)File Manager  (4)Gantt  (9)Gauge  (6)Git  (4)Grid  (27)HTML  (9)Installer  (2)Knockout  (2)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (225)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (22)Performance  (6)PHP  (1)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (5)Road Map  (9)Scheduler  (26)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (19)Solution Services  (2)Spreadsheet  (9)SQL  (7)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (11)Tips and Tricks  (59)UI  (128)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (1)Visual Studio  (19)Visual Studio Code  (11)Web  (212)What's new  (138)Windows 8  (19)Windows App  (1)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Share on twitter
Share on facebook
Share on linkedin
Introducing the New WinUI 3 ComboBox

Introducing the New WinUI 3 ComboBox

A combo box control is a dropdown control that allows you to type a value in a text box and choose from a list of predefined options.

We at Syncfusion have also developed a ComboBox control for the WinUI 3 platform for our 2021 Volume 3 release.

Following are the main features of the WinUI ComboBox in its initial release:

Let’s look at these features and learn how to integrate the new WinUI ComboBox control into your application.

Editing

The WinUI ComboBox supports both editable and non-editable text boxes for selecting an item from a data source.

In the editable mode, we can type and select the items from a collection. In this case, the typed item will get highlighted in a collection.

WinUI ComboBox in Editable Mode
WinUI ComboBox in Editable Mode

The non- editable mode prevents users from editing and instead allows them to select from the dropdown list.

ComboBox in Non- Editable Mode
ComboBox in Non- Editable Mode

Note: For more details, refer to the Editing in WinUI ComboBox documentation.

Multiselection

The ComboBox supports both single and multiple selection modes. The multiselection mode allows users to select multiple values from the dropdown list, whereas the single selection mode allows selecting only a single item. Multiple selection can be represented with checkboxes, like in the following screenshot.

MultiSelect ComboBox
MultiSelect ComboBox

Note: For more details, refer to the Multiple selections in WinUI ComboBox documentation.

Searching

Search for and select a required item from the list. You can search with either the starting or contained letters.

Searching in WinUI ComboBox
Searching in WinUI ComboBox

Note: For more details, refer to the Searching in WinUI ComboBox documentation.

Filtering

The ComboBox has built-in support to filter data items depending on the text entered in the editing text box. You can filter data by entering the starting letter or a specific letter in the item.

Refer to the following GIF images.

Filtering with Starting Letters in WinUI ComboBox
Filtering with Starting Letters in WinUI ComboBox
Filtering with Contained Letters in WinUI ComboBox
Filtering with Contained Letters in WinUI ComboBox

Note: For more details, refer to the Filtering in WinUI ComboBox documentation.

Grouping

You can group a collection and display the header for each group. Also, you can customize the group header with images and templates like in the following screenshot.

WinUI ComboBox with Grouped Items
WinUI ComboBox with Grouped Items

To display grouped collections, use the CollectionViewSource property. You can’t perform filtering while grouping a collection in the ComboBox control.

Note: For more details, refer to the Grouping in WinUI ComboBox documentation.

Selection box UI

You can easily customize the selection box appearance based on the selected item(s).

For example, you can display a country name with its flag or the selected iems count like in the following screenshot.

WinUI ComboBox with Customized Selection Box UI
WinUI ComboBox with Customized Selection Box UI

Note: Refer to the Selection box UI documentation for more details.

Item customization

You can easily customize the dropdown list items with images or any other custom control.

Items Customization in WinUI ComboBox
Items Customization in WinUI ComboBox

Note: To get detailed information, refer to the Customize ComboBoxItem documentation.

Theming

The ComboBox control is available in both light and dark themes.

Theming Support in WinUI ComboBox
Theming Support in WinUI ComboBox

Note: Refer to the Themes for Syncfusion WinUI Controls documentation.

Getting started with the WinUI ComboBox

We have explored the features of the WinUI ComboBox control. Now, let’s see how to add it to your application and use its basic features.

Step 1: Create a WinUI application.

First, create a simple project using the instructions provided in the Create app with Windows App SDK documentation.

Step 2: Add the Syncfusion.Editor.WinUI NuGet package.

Then, install the latest Syncfusion.Editor.WinUI NuGet package in the application from nuget.org or from the installed location, C:\Program Files (x86)\Syncfusion\Essential Studio\WinUI\xx.x.x.xx\NuGetPackages.

Note: xx.x.x.xx denotes the version of the Syncfusion WinUI Editor package.

Refer to the following screenshot.

Add the Syncfusion.Editor.WinUI NuGet PackageStep 3: Add the namespace.

Now, include the editors namespace in your XAML file with the following code.

xmlns:editors="using:Syncfusion.UI.Xaml.Editors"

Step 4: Initialize the ComboBox.

Initialize the ComboBox control and add the items like in the following code example.

<editors:SfComboBox x:Name="sfComboBox"
                    Width="250"
 	<editors:SfComboBoxItem Content="Badminton"/>
       <editors:SfComboBoxItem Content="Cricket"/>
       <editors:SfComboBoxItem Content="Football"/>
       <editors:SfComboBoxItem Content="Golf"/>
       <editors:SfComboBoxItem Content="Hockey"/>
</editors:SfComboBox>

This code will create the ComboBox with its items like the following GIF image.

WinUI ComboBox with Items
WinUI ComboBox Displaying Items

GitHub reference

Get the demo project for the WinUI ComboBox control on GitHub.

Conclusion

I hope you enjoyed learning about the new Syncfusion WinUI ComboBox control and its features. This control is available in our 2021 Volume 3 release. Also, check out our Release Notes and What’s New pages to see all the available new updates in this release. Try them out and leave your feedback in the comments section below!

You can download and check out our demo app in the Microsoft Store.

For current customers, the new version is available for download from the License and Downloads page. If you are not yet a Syncfusion customer, you can try our 30-day free trial to check out our newest features.

You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Related blogs

Tags:

Share this post:

Share on twitter
Share on facebook
Share on linkedin

Comments (1)

Nice! I like the Grouping and Selection features.

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top