Browse Source

Fix removing selected items in ListBoxPage.

Previously, would remove all items if `AlwaysSelected` enabled.
pull/4659/head
Steven Kirk 6 years ago
parent
commit
172feab259
  1. 6
      samples/ControlCatalog/ViewModels/ListBoxPageViewModel.cs

6
samples/ControlCatalog/ViewModels/ListBoxPageViewModel.cs

@ -38,9 +38,11 @@ namespace ControlCatalog.ViewModels
RemoveItemCommand = ReactiveCommand.Create(() =>
{
while (Selection.Count > 0)
var items = Selection.SelectedItems.ToList();
foreach (var item in items)
{
Items.Remove(Selection.SelectedItems.First());
Items.Remove(item);
}
});

Loading…
Cancel
Save