MenuItem.MergeType Proprietà

Definizione

Ottiene o imposta un valore che indica il comportamento di questa voce di menu quando il relativo menu viene unito a un altro.

public:
 property System::Windows::Forms::MenuMerge MergeType { System::Windows::Forms::MenuMerge get(); void set(System::Windows::Forms::MenuMerge value); };
public System.Windows.Forms.MenuMerge MergeType { get; set; }
member this.MergeType : System.Windows.Forms.MenuMerge with get, set
Public Property MergeType As MenuMerge

Valore della proprietà

Valore MenuMerge che rappresenta il tipo di unione della voce di menu.

Eccezioni

Il valore assegnato non è uno dei MenuMerge valori.

Esempio

Nell'esempio di codice seguente viene creato un MenuItem oggetto con MergeType e MergeOrder specificato in modo che la voce di menu venga aggiunta al menu unito in corrispondenza della prima posizione.

public:
   void InitMyFileMenu()
   {
      // Set the MergeType to Add so that the menu item is added to the merged menu.
      menuItem1->MergeType = MenuMerge::Add;
      // Set the MergeOrder to 1 so that this menu item is placed lower in the merged menu order.
      menuItem1->MergeOrder = 1;
   }
public void InitMyFileMenu()
{
   // Set the MergeType to Add so that the menu item is added to the merged menu.
   menuItem1.MergeType = MenuMerge.Add;
   // Set the MergeOrder to 1 so that this menu item is placed lower in the merged menu order.
   menuItem1.MergeOrder = 1;
}
Public Sub InitMyFileMenu()
    ' Set the MergeType to Add so that the menu item is added to the merged menu.
    menuItem1.MergeType = MenuMerge.Add
    ' Set the MergeOrder to 1 so that this menu item is placed lower in the merged menu order.
    menuItem1.MergeOrder = 1
End Sub

Commenti

Il tipo di unione di una voce di menu indica il comportamento della voce di menu quando ha lo stesso ordine di unione di un'altra voce di menu da unire. È possibile usare i menu uniti per creare un menu consolidato in base a due o più menu esistenti.

Si applica a

Vedi anche