//----------------------------------------------------------------------- public void Swap(DataDefinition def) { using (UndoRedo.ActionScope("Swap " + ChosenDefinition.Name + " to " + def.Name)) { Copy(); SelectedDefinition = (Definition as ReferenceDefinition).Keys.FirstOrDefault(e => e.Item1 == def.Name); ChosenDefinition = def; Clear(); Create(); Paste(); } }