To reproduce:
Add a RadForm as MDI child to another form. Add RadMenu to the child and the main forms. Associate hotkeys as follows:
RadMenuItem item = new RadMenuItem;
item.Text = "&File";
You will notice that only the main menu can be accessed with the Alt key and the shortcut.
Workaround:
Subscribe for each childform's KeyUp event and use the following event handler:
private void childForm_KeyUp(object sender, KeyEventArgs e)
{
Form form = sender as Form;
if (!form.Focused)
{
return;
}
RadMenu menu = null;
foreach (Control control in form.Controls)
{
if (control is RadMenu)
{
menu = control as RadMenu;
break;
}
}
if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt && menu != null)
{
foreach (RadItem item in menu.Items)
{
int ampersantIndex = item.Text.IndexOf("&");
if (ampersantIndex != -1)
{
char hotkeyChar = item.Text[ampersantIndex + 1];
if (char.ToLower(hotkeyChar) == char.ToLower((char)e.KeyValue))
{
item.PerformClick();
break;
}
}
}
}
}