How to: Focus a specific command within a menu
The following example shows how you can focus a specific subitem within a container item.
After the menu is opened, we focus the first subitem in it using the BarItemLink.Focus method.
The result is shown below:
// The item and its link for which the menu should be opened BarSubItem containerItem = mFile; BarSubItemLink containerLink = containerItem.Links as BarSubItemLink; // Open the menu for the link containerLink.OpenMenu(); // Focus the first link in the menu opened containerLink.VisibleLinks.Focus();