private void MoveFastKeyOnClick(object sender, RoutedEventArgs e) { string newPath = (_isFirstFocused ? SecondPanelPath : FirstPanelPath).Text; List <Item> items = (_isFirstFocused ? FirstPanel : SecondPanel).Items.Cast <Item>() .Where(item => item.IsChecked).ToList(); OperationWindow operationWindow = new OperationWindow("Moving"); operationWindow.OnFinish += (o, s) => { UpdatePanels(); operationWindow.Close(); }; operationWindow.Show(); operationWindow.Move(items, newPath); UpdatePanels(); }