The Windows Phone Toolkit for Windows Phone 8.0 has a control called LongListMultiSelector that offers a really cool way to select items. It shifts the item content to the right slightly so users can tap that area in order to select that item. The default e-mail application has the exact behavior I want to achieve.
I'm trying to achieve the same behavior in a Windows Phone 8.1 Windows Runtime app, but am having a hard time to get it done. Since the LongListMultiSelector inherits from a simple Control I think it might be possible to convert it to Windows Phone 8.1 but I would rather not do that if I can avoid it.
Anyway, has anyone done this or know how to do it?
There's no reason to implement your DataTemplate with a CheckBox. ListView already supports multiple selection mode, and has supported it since WinRT and Windows 8.
Essentially, all you need to do is change the SelectionMode to multiple, and the CheckBoxes will appear on the left just like you're used to with LongListMultiSelector.
Let's say you have a dummy ListView like this one, with hardcoded items, to keep it simple:
<ListView x:Name="ListViewMultiSelector" SelectionMode="None">
<ListViewItem>Dog0</ListViewItem>
<ListViewItem>Dog1</ListViewItem>
<ListViewItem>Dog2</ListViewItem>
<ListViewItem>Dog3</ListViewItem>
<ListViewItem>Dog4</ListViewItem>
<ListViewItem>Dog5</ListViewItem>
</ListView>
If you change the SelectionMode in code behind (on some event, button click, page tap, swipe, whatever)
this.ListViewMultiSelector.SelectionMode = ListViewSelectionMode.Multiple;
it will show the CheckBoxes.
In the SelectionChanged event (in SelectionChangedEventArgs to be more exact) you can get AddedItems and RemovedItems, a list of objects - IList. AddedItems contains the latest selected items which may have triggered the SelectionChanged, and the RemovedItems contains the latest unselected items which may have triggered the SelectionChanged.