Quantcast
Channel: Caliburn.Micro: Xaml Made Easy
Viewing all articles
Browse latest Browse all 1760

New Post: ListBox SelectionMode="Multiple" and SelectedItems conevention

$
0
0
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.

Regards
Alan

Viewing all articles
Browse latest Browse all 1760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>