contextmenu

Running a .bat file located in %AppData% from context menu

两盒软妹~` 提交于 2019-12-21 19:27:44
问题 When I add an entry to the Windows Explorer context menu using the registry entries as follows: [HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell] [HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Similar Files] [HKEY_CURRENT_USER\SOFTWARE\Classes\*\shell\Similar Files\command] @="%AppData%\\FindAlike\\AddRightClickFile.bat \"%1\"" I get an error Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item. If I copy the file AddRightClickFile

Programmatically open context menu using UI automation?

徘徊边缘 提交于 2019-12-21 17:00:02
问题 I'm trying to implement a right click context menu using UI automation. Since UI automation does not have a native right click pattern I am adding an ExpandCollapse provider to the listview's AutomationPeer class and mapping the expand and collapse to opening and closing the context menu. My question, is there a better method of invoking the context menu that doesn't involve trying to instantiate a class with a private constructor? I can't use SendKeys with Shift-F10. I'd like to use the

How do you get a different Context Menu if you Lt-Click or Rt-Click on a notify icon?

大兔子大兔子 提交于 2019-12-21 12:25:46
问题 I have a application that is based out of the system tray. I have a nice context menu if you right click on it however I would like a different context menu to show up if you left click on it. Right now I make the different menu show up with private void niTrayIcon_MouseClick(object sender, MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { cmsTrayLeftClick.Show(Cursor.Position); } } That makes the menu show up but clicking off the menu does not make it go away, the

DataGridColumnHeader ContextMenu programmatically

一曲冷凌霜 提交于 2019-12-21 12:02:12
问题 I have this code in View.cs var contextMenu = this.dataGridFacade.GiveContextMenuForDataGrid(this.DataGridAllJobs); this.DataGridAllJobs.ContextMenu = contextMenu; But I want to add this context menu for header only. Is it possible? 回答1: You just have to retrieve the DataGridColumnHeadersPresenter of your DataGrid and set its ContextMenu. var contextMenu = this.dataGridFacade.GiveContextMenuForDataGrid(this.DataGridAllJobs); var columnHeadersPresenter = this.DataGridAllJobs.SafeFindDescendant

DataGridColumnHeader ContextMenu programmatically

不羁岁月 提交于 2019-12-21 12:02:06
问题 I have this code in View.cs var contextMenu = this.dataGridFacade.GiveContextMenuForDataGrid(this.DataGridAllJobs); this.DataGridAllJobs.ContextMenu = contextMenu; But I want to add this context menu for header only. Is it possible? 回答1: You just have to retrieve the DataGridColumnHeadersPresenter of your DataGrid and set its ContextMenu. var contextMenu = this.dataGridFacade.GiveContextMenuForDataGrid(this.DataGridAllJobs); var columnHeadersPresenter = this.DataGridAllJobs.SafeFindDescendant

ContextMenu not popping up on Long click

天涯浪子 提交于 2019-12-21 05:07:07
问题 The context menu is not popping up on the long click on the list items in the list view. I've extended the base adapter and used a view holder to implement the custom list with textviews and an imagebutton. adapter = new MyClickableListAdapter(this, R.layout.timeline, mObjectList); list.setAdapter(adapter); registerForContextMenu(list); Implementation of onCreateContextMenu @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { // TODO Auto-generated

Determining which ListViewItem was clicked on in a ListView when executing a ContextMenu MenuItem

女生的网名这么多〃 提交于 2019-12-21 02:41:30
问题 I'm trying to use the context menu in a listview to run some code that requires data from which item it originated from. I initially just did this: XAML: <ListView x:Name="lvResources" ScrollViewer.VerticalScrollBarVisibility="Visible"> <ListView.Resources> <ContextMenu x:Key="resourceContextMenu"> <MenuItem Header="Get Metadata" Name="cmMetadata" Click="cmMetadata_Click" /> </ContextMenu> </ListView.Resources> <ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Setter

UWP ListView Item context menu

∥☆過路亽.° 提交于 2019-12-21 02:05:46
问题 I'm searching internet for how to add context menu for ListView . So far I've found one that actually displays context <ListView> ... RightTapped="ContactsListView_RightTapped" > ... <ListView.Resources> <MenuFlyout x:Name="allContactsMenuFlyout"> <MenuFlyout.Items> <MenuFlyoutItem x:Name="Edit" Text="Edit"/> <MenuFlyoutItem x:Name="Remove" Text="Remove" Click="Remove_Click"/> </MenuFlyout.Items> </MenuFlyout> </ListView.Resources> ... </ListView> private void ContactsListView_RightTapped

Context Menu on a row of TableView?

[亡魂溺海] 提交于 2019-12-20 12:31:08
问题 I am using JavaFX and my application has a table and I can add elements to the table but I want to create a context menu that displays on a row when I right click on that row. What I have... In Scene Builder I have a method that runs on when the Context Menu is activated but that isn't exactly what I want. This would be fine really because I am programmatically grab the selected item from the table whenever I want. The issue, if I keep what I currently have, is getting the context menu to

Chrome contextMenus API ContextType

天大地大妈咪最大 提交于 2019-12-20 10:42:08
问题 I am looking at the API for chrome.contextMenu here. The context types listed are: "all" "page" "frame" "selection" "link" "editable" "image" "video" "audio" "launcher" "browser_action" "page_action" Some of these are intuitive, the others not so much. Where can I find definitions for these different contexts? It is hard to make use of the api without this background knowledge. Specifically, I would like to know "page", "frame", "editable", and "launcher". 回答1: "link", "image", "video",