var menu = new Windows.UI.Popups.PopupMenu(); 注解 上下文菜单最多可以显示六个命令。 此限制有助于确保上下文菜单保持整洁、可用且与用户直接相关。 可以在上下文菜单示例 (Windows 10) 和上下文菜单示例 (Windows 8.1) 中看到演示如何创建和自定义上下文菜单的完整代码示例。 对于基于 XAML 的桌面应用程序,...
建立PopupMenu 類別的新實例。 在傳統型應用程式中,在以顯示UI的方式使用這個類別的實例之前,您必須將物件與其擁有者的視窗句柄產生關聯。 如需詳細資訊和程式代碼範例,請參閱 顯示相依於 CoreWindow 的 WinRT UI 物件。
Windows.UI.Popups 編輯 取得操作功能表的命令。 C# publicIList<IUICommand> Commands {get; } 屬性值 IList<IUICommand> 操作功能表的命令。 範例 在建立新的PopupMenu之後,將命令新增至操作功能表。 為每個命令建立UICommand物件,並將命令附加至操作功能表。
Windows.UI.Popups PopupMenu C# Add Print TwitterLinkedInFacebookEmail Reference Feedback Definition Namespace: Windows.UI.Popups Edit Creates a new instance of thePopupMenuclass. In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the...
UI.Popups Edit Represents a context menu. In a desktop app, before using an instance of this class in a way that displays UI, you'll need to associate the object with its owner's window handle. For more info, and code examples, see Display WinRT UI objects that depend on Core...
Windows.ApplicationModel.AppExtensions Windows.ApplicationModel.Appointments Windows.ApplicationModel.Appointments.AppointmentsProvider Windows.ApplicationModel.Appointments.DataProvider Windows.ApplicationModel.AppService Windows.ApplicationModel.Background Windows.ApplicationModel.Calls ...
Figure 11-20 Edit Pop-Up Menu Reset Pointer This command clears the current selection and places the pointer at the beginning of the file. Clear This command removes the current sound data from the display canvas. Delete Unselected This command deletes everything in the display canvas that is...
Figure 1. Example panel displaying three pop-up windows Menu Utilities Compilers Options Status Help -┌───────────────────────────────────┐ --- │ --- Panel A --- │ ption Menu │ │ 0│...
Figure 1. Example panel displaying three pop-up windows Menu Utilities Compilers Options Status Help -┌───────────────────────────────────┐ --- │ --- Panel A --- │ ption Menu │ │ 0│...
When a user selects the Open Link in New Window option from the pop-up menu, thesmallViewbrowser is added to the application toolbar. This behavior is defined by thesetCreatePopupHandlermethod, which returns the web engine of an alternative browser to notify the application where to render th...