menuitem

[WPF] AccessKey/Hotkey in custom textual MenuItem.Header possible?

Is it possible to access the following formatted menu item like any other standard menu item (using the underscore-method, e.g. "_File" would be accessible by pressing "f")? I would like to use "O" as "access key" here. Unfortunately, <AccessText> does not seem to be usable directly (I imaginged something like <AccessText Visibility="...

Why databound ContextMenu items don't hide?

I wan't to hide/show menuitems in a contextmenu using some propery of databound object. But my menuitems don't hide, they behave as if their Visiblity would be set to Visibility.Hidden (not Visibility.Collapsed as it really is), what's the reason of such behaviour? Here's an example: XAML: <Window x:Class="MenuTest.Window1" xmlns=...

Why is this WPF RoutedCommand bound Context MenuItem disabled?

Hi all, I'm still fumbling my way around WPF at the moment, and can not figure out why this context menu item is disabled: <Window x:Class="DisabledMenuItemProblem.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-na...

WPF C# - Change the brush of a menu's background

Does anyone know how to change the brush for a menu's background? This sounds simple, but I don't see any obvious way to do this. You'd think that the Background property would change it, but it doesn't. Here's what my menu looks like (notice the default white background): Example Image Example Code: <Window.Resources> <Soli...

Problem: adding feature in MOSS 2007

Hi All, I have added a menu item in 'Actions' menu of a document library as follows(Using features: explained in MSDN How to: Add Actions to the User Interface: http://msdn.microsoft.com/en-us/library/ms473643.aspx): feature.xml as follows: <?xml version="1.0" encoding="utf-8" ?> <Feature Id="51DEF381-F853-4991-B8DC-EBFB485BACDA" ...

how to apply custom action in ECB only for document item

I have added a menu item in edit control block(ECB) in document library(using following msdn article http://msdn.microsoft.com/en-us/library/ms473643.aspx) Now i found that the custom action(menu Item) in ECB is displayed for both document item and document folder. So how to apply custom action only for document item? ...

Android MenuItem Toggle Button

Hello, In my Android application, I want a setting to be toggleable in it's menu like the Dialer app does for speaker and mute. You can see a picture below: You see how the Speaker, Mute and Hold options are toggle buttons - you can tap them again and they will toggle the green color. They may do this in a custom way, but I suspect ...

How can I determine which menu item called an ActionListener?

I have a Java program where I have a JMenu with an arbitrary number of items (in this case, there is one menu item for each dynamic library currently loaded in a different program). I'm running a loop to add JCheckBoxMenuItem s to the menu, since I don't know how many there will be. How can I set up an action listener for these menu ite...

Asp Binding question

Below is a some sample code I am trying to update. The client would like to make the menu item text an AppSetting Value. I have been able to setup the appsettings and the function to implement it. But I am getting an error on my Bind code and wondering if anyone see something I missed. Is it as easy as setting an ID tag for the Men...

ASP.NET MenuItem Individual Styles

I'm hoping to use an ASP.NET Menu Control for navigation through my site. However, I've got a requirement that each MenuItem must be styled differently (different colors, both static, and onHover). Without creating a custom class that would inherit from MenuItem, is this possible? Thoughts on a better solution? ...

WPF: Disappaearing icons

I have several icons which are declared in Window.Resources. They show up fine the first time they need to appear (eg: a Menu is clicked, the MenuItem icon works), but after another Menu (eg: a context menu) is shown, the original icon disappears and does not return. It's as though the last element which used the icon for the first time ...

Inline code in ASp.Net menu item

Hello Does anybody know if it is the way to set control's child attributes properties by inline code? I mean something like that <asp:MenuItem Text="text" NavigateUrl='<%# GetItemURL("val") %>' ></asp:MenuItem> CodeBehind protected string GetItemURL(string tag) { if (string.IsNullOrEmpty(_pageUrl))...

Java: How can I add a JMenu to a JPanel or create a drop down button?

Hello, is there any way to add a JMenuItem to a JPanel so that I can create a button to show multiple options, like the latest news button in firefox, under the address bar? I can only add JMenu and JMenuItems to a JMenuBar, JPopupMenu and other JMenus and JMenuitems Is there any way to create in Java Swing a drop down Jbutton? (the on...

WPF: Nested MenuItems in a ToolBar

Hi. I am working on some XAML for a wpf application and I am having some trouble getting it to do what I want. Here is a sample of my XAML: <!-- Tool Bar Tray --> <ToolBarTray Name="toolBarTray1" DockPanel.Dock="Top"> <!-- File And Edit Tools --> <ToolBar Name="toolBar1" Band="1" BandIndex="1"> <!-- Regular Items --> ...

WinForms open popup usercontrol as menuitem menu dropdown?

Been searching everywhere and can't find a way to do this. I have a menubar across the top of my winforms program. Now it just pops up a normal menuitem menu. I would like to disable that menu and popup a nice looking usercontrol that looks like its the dropdown for that menu item but includes much more customization. A good example wou...

Why can't I disable this XUL menuitem?

I'm at my wits end, and it's probably something really simple.. But I've got basically this code: var menuitem = document.getElementById('mymenuitem'); alert(menuitem); alert(varImChecking == null); menuitem.setAttribute('disabled', (varImChecking == null) ? 'true' : 'false'); It should be disabling the 'mymenuitem' menu item, but has...

Is there a way to programatically close a menuitem in WPF

I have a menu in wpf that has an input box and a button on it. Once the user clicks the button I need to close the menu. Is there a way to do this? <Menu x:Name="MainMenu"> <MenuItem Header="Main"> <MenuItem Header="SubMenu" x:Name="SubMenu"> <StackPanel Orientation="Horizontal"> ...

internet explorer -> Tools -> proxy settings: How to add menu item, create window when clicked, n perform opreations on registry

Hi I want to add menu item to Internet Explorer-> tools. For example: Exactly like Intrnet explorer-> Tools -> Delete browsing history I want to add proxy related actions For example: tools -> Enable proxy tools -> Disable proxy Also to have proxy cache, i would like to display window exactly like what is displayed when we click o...

Unique id on the 'a' tag of a menu item in Drupal

I'm trying to generate unique id's on the 'a' tag of the menu item so that I can implement Popups API. This is what my function in template.php looks like: function phptemplate_menu_item_link($link) { if (empty($link['options'])) { $link['options'] = array(); } // If an item is a LOCAL TASK, render it as a tab if ($link['t...

How to pad an image and text in the asp:Menu control

I have an asp:Menu control that has four different menu items in it. Each menu item has a graphic and a text description. <Items> <asp:MenuItem Text="New Authorization Form" Value="default.aspx" NavigateUrl="~/Default.aspx" ImageUrl="~/Images/TextPad.png"></asp:MenuItem> <asp:MenuItem Text="Manage My Forms" Value="myrequests.as...