Sorting and Filtering Items

The CollectionView to filters and sorts the data bound to the ComboBox. You can use the CollectionView.currentItem instead of the ComboBox.selectedItem to access a currently selected item. This sample filters out items in the original data source, by population > 20 million, and sorts the items by Country name.