MenuItem.MergeType 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指示該選單項目在與另一個選單合併時的行為。
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
屬性值
一個 MenuMerge 代表選單項目合併類型的值。
例外狀況
分配的數值並非其中之一。MenuMerge
範例
以下程式碼範例會建立 MenuItem 帶有 和 MergeTypeMergeOrder 的 ,使選單項目被加入合併選單的第一位。
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
備註
選單項目的合併類型表示當該選單項目與另一個合併項目合併順序相同時的行為。 你可以利用合併選單,根據兩個或以上現有選單建立一個整合選單。