public void revertEvent() { if(undoList.Items.Count > 0) undoList.Invoke((MethodInvoker)(() => undoList.Items.RemoveAt(undoList.Items.Count - 1))); }