private void PasteSelection(object sender, EventArgs e) { if (MDockArea.ActiveDocument.GetType().Equals(typeof(CodeEditor))) { CodeEditor ce = (CodeEditor)MDockArea.ActiveDocument; ce.Paste(); } }