Menu.IsMainMenu 屬性

定義

取得或設定值,這個值表示此 Menu 是否要接收主功能表啟動通知。

public:
 property bool IsMainMenu { bool get(); void set(bool value); };
public bool IsMainMenu { get; set; }
member this.IsMainMenu : bool with get, set
Public Property IsMainMenu As Boolean

屬性值

Boolean

如果功能表要接收主功能表啟動通知,則為 true,否則為 false。 預設為 true

範例

下列範例示範如何使用 IsMainMenu 屬性來建立 Menu 未收到啟用通知的 。

<Menu Margin="10,10,5,5" Width="80" Background ="White" Grid.Column="0" Grid.Row="3" 
     HorizontalAlignment="Left" IsMainMenu="false">

備註

如果頁面上有多個 Menu 控制項, Menu 則不應該接收 ALT 或 F10 按鍵通知的控制項應該將此屬性設定為 false

相依性屬性資訊

識別碼欄位 IsMainMenuProperty
中繼資料屬性設定為 true

適用於

另請參閱