contextmenu

onContextItemSelected doesn't get called

扶醉桌前 提交于 2019-11-28 09:15:15
问题 I have made a simple app that just brings up an AlertDialog, with four items in the list. I register a context menu. When I long click one of the items, I get the context menu. I then select an item from the context menu, but onContextItemSelected never gets called. Any help? Thanks. test.java: package com.cerulean.tech.creations.test; import android.app.Activity; import android.os.Bundle; import android.view.ContextMenu; import android.view.MenuItem; import android.view.View; import android

WPF ViewModel Commands CanExecute issue

蹲街弑〆低调 提交于 2019-11-28 09:12:30
I'm having some difficulty with Context Menu commands on my View Model. I'm implementing the ICommand interface for each command within the View Model, then creating a ContextMenu within the resources of the View (MainWindow), and using a CommandReference from the MVVMToolkit to access the current DataContext (ViewModel) Commands. When I debug the application, it appears that the CanExecute method on the command is not being called except at the creation of the window, therefore my Context MenuItems are not being enabled or disabled as I would have expected. I've cooked up a simple sample (

Trigger right-click

北战南征 提交于 2019-11-28 09:10:20
I am trying to late-bind context menus to elements, using the ContextMenu plugin . So on the first right-click on those elements, I would like to : intercept the right-click through a live event on a certain "uncontextmenued" class, determine if the data('events').contextmenu exists, if not, attach the context-menu (and change the class to avoid re-throwing this live process), re-throw the right-click event to show the right-click. I'm having trouble with the last item. jQuery allows to .click() or to .trigger('click') , which simulate a left-click, but there seems not to be a way to fire a

How to retrieve JSON via ASP.Net context.Request

空扰寡人 提交于 2019-11-28 09:06:17
var OrderInfo = {"ProductID": "ProductIDValue", "ProductName": "ProductName", "Quantity": 1, "Amount": 9999, "SLQuantity": 9999, "SLDate": "08/03/2010" }; var DTO = { 'OrderInfo': OrderInfo }; $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "JasonHandler.ashx", data: JSON.stringify(DTO), dataType: "json" }); I'm trying to retrieve posted JSON data on server side in an ASHX file via this code: string strrequest = context.Request["OrderInfo"]; but it always return null. What Am I doing wrong? ronaldwidha get the request body from HttpContext.Current.Request

Is it possible to hide/remove arbitrary context menu items in Eclipse (3.6)

家住魔仙堡 提交于 2019-11-28 08:17:37
My question can be split into three: Is it possible to hide/remove arbitrary context menu items in Eclipse (3.6) by ... standard UI? some existing plug-in? custom plug-in? I failed to find ways to do this by methods 1 and 2. If the only option is creating custom plug-in, could anyone push me towards the right direction where to start (I have some experience in Java, but not in Eclipse plug-ins). You can hide menus or menu entries through the standard GUI: see help To hide a menu item or toolbar button: Switch to the perspective that you want to configure. Select Window > Customize Perspective.

Setting a WPF ContextMenu's PlacementTarget property in XAML?

喜夏-厌秋 提交于 2019-11-28 07:34:29
<Button Name="btnFoo" Content="Foo" > <Button.ContextMenu Placement="Bottom" PlacementTarget="btnFoo"> <MenuItem Header="Bar" /> </Button.ContextMenu> </Button> gives me a runtime error 'UIElement' type does not have a public TypeConverter class I also tried <Button Name="btnFoo" Content="Foo" > <Button.ContextMenu Placement="Bottom" PlacementTarget="{Binding ElementName=btnFoo}"> <MenuItem Header="Bar" /> </Button.ContextMenu> </Button> and that put the ContextMenu in the top left corner of my screen, rather than at the Button You should be setting the ContextMenuService.Placement attached

Overriding the right-click context menu in web browsers - pros and cons

独自空忆成欢 提交于 2019-11-28 07:19:24
问题 We are programming a web application (not 'just' a web site, but functionality-wise a real application), and have the following discussion for the next release: our UI designer wants to replace the browser's right-click context menu (showing our own menu where appropriate, or no menu at all) because he wants the web app to be more like our (existing) Windows app our developers (and I) strongly object because this is bad practice, and simply something you do not do in a web application Thus, I

jsTree and Context Menu: modify items

岁酱吖の 提交于 2019-11-28 06:24:39
I'm using jsTree 3.0.0 and I need to modify the context in one of the following ways: Change label language for the default items, disable some default items and add new items. Rewrite all items and bind to some new items the create, rename and delete function. I tried several approaches but nothing worked. For example, this returns Uncaught TypeError: Object [object global] has no method 'create' when I click on create. "contextmenu":{ "items": function($node) { return { createItem : { "label" : "Create New Branch", "action" : function(obj) { this.create(obj); alert(obj.text())}, "_class" :

Dojo DataGrid Context Menu onRowContextMenu displays even when right-clicking in BLANK area of DataGrid

旧街凉风 提交于 2019-11-28 06:02:28
问题 I have a DataGrid that has items in it. When you right-click on one of the rows, a Dojo Context Menu is displayed with the option to delete that row. If you try to right-click on a blank area of the DataGrid, the context menu is NOT displayed.... BUT, if you first right click on a row, and then click the Cancel menu option (which does nothing) or if you left-click somewhere else on the page (which hides the Context Menu) and the go to right click on a blank area of the DataGrid, the Context

WPF Context menu doesn't bind to right databound item

坚强是说给别人听的谎言 提交于 2019-11-28 05:58:36
I have a problem when binding a command in a context menu on a usercontrol that is on a tab page. The first time I use the menu (right-click on the tab) it works great, but if I switch tab the command will use the databound instance that was used the first time. If I put a button that is bound to the command in the usercontrol it works as expected... Can someone please tell me what I'm doing wrong?? This is a test project that exposes the problem: App.xaml.cs: public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); CompanyViewModel