I am using a WPF Listbox which is databound to an ICollectionView to display a list of items that can be filtered. And I am using context menu on the ListBox to group the items in the Listbox. For this, I have defined a groupstyle on the Listbox and it has an expander in it. The code for the same is as below. All the xaml code is in the Generic.xaml file and the control which has this ListBox is a custom control defined in the CustomControls library.I am using a WPF Listbox which is databound to