//Toolbar private void ShowEndLine(object sender, EventArgs e) { ToolStripButton tsb = (ToolStripButton)sender; if (MDockArea.ActiveDocument.GetType().Equals(typeof(CodeEditor))) { CodeEditor ce = (CodeEditor)MDockArea.ActiveDocument; ce.ShowEndOfLine(tsb.Checked); } }