private void ListViewFilialsAll_MouseDoubleClick(object sender, MouseButtonEventArgs e) { ItemFilial itemFilial = ListViewFilialsAll.SelectedItem as ItemFilial; if (itemFilial is null) { return; } ItemsFilialSelected.Add(itemFilial); ItemsFilialAll.Remove(itemFilial); }
private void ButtonFilialToSelected_Click(object sender, RoutedEventArgs e) { List <ItemFilial> itemsToMove = new List <ItemFilial>(); foreach (ItemFilial item in ListViewFilialsAll.SelectedItems) { itemsToMove.Add(item); } foreach (ItemFilial item in itemsToMove) { ItemsFilialSelected.Add(item); ItemsFilialAll.Remove(item); } }