ListBox SelectionMode="Multiple" and SelectedItems conevention

Topics: Conventions
Jan 8, 2014 at 2:02 AM
I have a user control that contains a ListBox with the SelectionMode set to Multiple. I use the same View and ViewModel source files in an Excel solution (with a WPF document pane) and a standalone WPF application.

In the Excel version it works as expected, but in the standalone WPF the selected items are not being reflected in the UI despite the code having a CollectionChanged handler registered.

The logger shows me that when used within Excel, a message appears for the ListBox that says 'SelectedItems convention applied to ..' and selecting items does not generate further messages but fires the CollectionChanged event.

In the standalone WPF solution I do not see the 'SelectedItems convention applied to ...' message for the ListBox element. Selecting items results in a 'SelectedItemChanged' message appearing in the log instead of firing the CollectionChanged event.

Both apps are using Caliburn.Micro 1.5.2.
Does anybody know what might be causing this discrepancy.

Jan 8, 2014 at 2:12 AM
After several hours of searching I noticed that I was missing the Conventions.Apply() line from my bootstrapper.
Marked as answer by alangrutter on 1/7/2014 at 7:12 PM