public ListBoxPageViewModel() { Items = new ObservableCollection <string>(Enumerable.Range(1, 10000).Select(i => GenerateItem())); Selection = new SelectionModel(); Selection.Select(1); AddItemCommand = ReactiveCommand.Create(() => Items.Add(GenerateItem())); RemoveItemCommand = ReactiveCommand.Create(() => { while (Selection.SelectedItems.Count > 0) { Items.Remove((string)Selection.SelectedItems.First()); } }); SelectRandomItemCommand = ReactiveCommand.Create(() => { var random = new Random(); using (Selection.Update()) { Selection.ClearSelection(); Selection.Select(random.Next(Items.Count - 1)); } }); }