Exemplo n.º 1
0
 /// <summary>
 /// Remove a menu entry from the menu
 /// </summary>
 /// <param name="entry"></param>
 protected void RemoveMenuEntry(IMenuEntry entry)
 {
     //try to remove the entry from the list
     if (MenuEntries.RemoveItem(entry))
     {
         //set the selected item if needed
         if (SelectedIndex >= MenuEntries.Items.Count)
         {
             SelectedIndex = MenuEntries.Items.Count - 1;
         }
     }
 }