contextmenu

TabControl Context Menu

孤人 提交于 2019-12-19 06:29:11
问题 In a Windows Forms app I set the ContextMenuStrip property on a TabControl. How can I tell the user clicked a tab other then the one that is currently selected? How can I restrict the context menu from showing only when the top Tab portion with the label is clicked, and not elsewhere in the tab? 回答1: Don't bother setting the contextMenuStrip property on the TabControl. Rather do it this way. Hook up to the tabControl's MouseClick event, and then manually show the context menu. This will only

What can I use instead of Context Menu in android? [closed]

99封情书 提交于 2019-12-19 04:58:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I want to show some options when clicking a button. I use context menu now. But the context menu showing below Android 3 is not good with the current app design. I want to either change the style of the context menu or use some other controls or replace the context menu with something else. What can I do to make

How to add an icon to System.Windows.Forms.MenuItem?

雨燕双飞 提交于 2019-12-19 03:38:10
问题 I tried to add an icon to one of my context menu items, but I couldn't do it. Can anybody help me? Here's the code I've written: private System.Windows.Forms.ContextMenu notifyContextMenu; private void foo() { if (notifyIcon == null) { notifyIcon = new System.Windows.Forms.NotifyIcon(); } if (notifyContextMenu == null) { notifyContextMenu = new System.Windows.Forms.ContextMenu(); notifyContextMenu.MenuItems.Add("Exit"); // How do I add an icon to this context menu item? } notifyIcon

Add 'Delete empty folders' to Windows context menu

一个人想着一个人 提交于 2019-12-18 16:52:31
问题 I'd like to add to context menu this nice shell script that automatically deletes all empty folders and subfolders under the folder it is run from: for /f "usebackq delims=" %%d in (`"dir /ad/b/s | sort /R"`) do rd "%%d" To add such an item to (directories) context menu I should run a file with reg extension having a content similar to Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\Delete empty folders] [HKEY_CLASSES_ROOT\Directory\shell\Delete empty folders\Command]

Customize right click highlight on view-based NSTableView

♀尐吖头ヾ 提交于 2019-12-18 16:31:30
问题 I have a view-based NSTableView with a custom NSTableCellView and a custom NSTableRowView. I customized both of those classes because I want to change the appearance of each row. By implementing the [NSTableRowView draw...] methods I can change the background, the selection, the separator and the drag destination highlight. My question is: how can I change the highlight that appears when the row is right clicked and a menu appears? For example, this is the norm: And I want to change the

jQuery Right-Click Context Menu Help!

人盡茶涼 提交于 2019-12-18 15:53:00
问题 http://pastebin.com/YyDzQ4Bk this is a plugin for right click context menu, anyone know why it doesn't work in IE? Not only that, it's breaking many of my other jQuery things, such as fancy box and some jQuery hover functions. 回答1: Do you really need a plugin? You could make your own context menu using contextmenu event: $("element").bind("contextmenu",function(e) { e.preventDefault(); // create and show menu }); Some ways to achieve it jQuery Context Menu script Create a jQuery Context Menu

Binding WPF ContextMenu MenuItem to UserControl Property vs ViewModel Property

丶灬走出姿态 提交于 2019-12-18 13:39:44
问题 I'm struggling to understand what is going on with the ContextMenu. I know it is rendered as a separate window, with a separate visual tree, so we can't use relative binding to bind a command exposed as a property of the user control. e.g. the following does not work: <MenuItem Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=TestCommand}" Header="Test" /> But, if you set the data context of the user control to a view model that exposes a command as a property,

Binding WPF ContextMenu MenuItem to UserControl Property vs ViewModel Property

好久不见. 提交于 2019-12-18 13:39:39
问题 I'm struggling to understand what is going on with the ContextMenu. I know it is rendered as a separate window, with a separate visual tree, so we can't use relative binding to bind a command exposed as a property of the user control. e.g. the following does not work: <MenuItem Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=TestCommand}" Header="Test" /> But, if you set the data context of the user control to a view model that exposes a command as a property,

Context Menu items command binding WPF using MVVM

依然范特西╮ 提交于 2019-12-18 13:35:30
问题 I know this question has been asked many times in different ways in many websites and also in StackOverFlow but all the answers I found are not helping me ot to be precise I am not able to understand them and implement in my application. So I thought of putting some code from my application so that you people can help me better. Problem Statement : I am using a WPF DataGrid. I have added a Context Menu and I have 3 options Cut,Copy,Paste. I am using MVVM for development. I want to DataBind

ContextMenu in MVVM

痞子三分冷 提交于 2019-12-18 13:24:28
问题 I want to bind a contextmenu to a list of commands. <Grid.ContextMenu> <ContextMenu ItemsSource="{Binding ItemContextCommands, Converter={StaticResource commandToStringConverter}}"> <ContextMenu.ItemTemplate > <DataTemplate DataType="MenuItem"> <MenuItem Command="{Binding}"></MenuItem> </DataTemplate> </ContextMenu.ItemTemplate> </ContextMenu> </Grid.ContextMenu> The commandToStringConverter simply converts a list of commands to a list of strings calling the ToString() on each command in the