public void ClearControls() { foreach (MobileControl control in ControlsArray) { MainForm.Controls.Remove(control.GetControl() as Control); } ControlsArray.Clear(); MainForm.HideCellName(); // MainForm.HotKeyAgent.UnRegisterKeys(); ToDoCommand = string.Empty; }