public override void Execute(object parameter)
        {
            var selectedItems = selectedItemsProvider.GetIndices().ToArray();

            if (!selectedItems.Any())
            {
                return;
            }

            var selectedItemIndex = selectedItems[0];

            itemProvider.SetItem(Items[selectedItemIndex]);
            Items.RemoveAt(selectedItemIndex);
        }
Exemplo n.º 2
0
        public override void Execute(object parameter)
        {
            var indices = itemsProvider.GetIndices();

            if (indices == null)
            {
                return;
            }

            var removedCount = 0;

            foreach (var index in indices.OrderBy(i => i))
            {
                Items.RemoveAt(index - (removedCount++));
            }

            itemsProvider.ClearSelection();
        }