Dictionary<string, Action<IWin32Window>> ItemHandlers = new Dictionary<string, Action<IWin32Window>>() { { "A", o => MessageBox.Show(o, "The command A is executed", "Dx Sample", MessageBoxButtons.OK, MessageBoxIcon.Information) }, { "B", o => MessageBox.Show(o, "The command B is executed", "Dx Sample", MessageBoxButtons.OK, MessageBoxIcon.Information) } };