menuitem

No ripple on menu item if actionBar/Toolbar is white

坚强是说给别人听的谎言 提交于 2019-12-22 08:26:04
问题 I have white toolbar with menu item showed as action that is a black vector asset from material icons. There is no ripple effect on menu item click because ripple effect is also white. If toolbar background is changed to other color e.g blue, ripple appears. How to change menu item ripple color so it will be visible on white background? I was trying to change colorControlHighlight in AppTheme but it hasn't changed menu item ripple color. Style <style name="AppTheme" parent="Theme.AppCompat

asp.net menu with submenu items, redirect by code behind

南楼画角 提交于 2019-12-22 08:05:57
问题 I have a menu control with 2 levels of menu items! I would like to navigate via code behind OnMenuItemClick event because when i use NavigationUrl property my ajax UpdateProgress wont start! The Problem is, whatever submenu item i click, when the event raises it gets every time the first item?! <asp:Menu ID="Menu1" runat="server" onmenuitemclick="Menu1_MenuItemClick" > ... <Items> <asp:MenuItem Text="WorkFlows"> <asp:MenuItem Text="Overview" Value="Workflow"></asp:MenuItem> <asp:MenuItem Text

asp.net menu with submenu items, redirect by code behind

巧了我就是萌 提交于 2019-12-22 08:05:38
问题 I have a menu control with 2 levels of menu items! I would like to navigate via code behind OnMenuItemClick event because when i use NavigationUrl property my ajax UpdateProgress wont start! The Problem is, whatever submenu item i click, when the event raises it gets every time the first item?! <asp:Menu ID="Menu1" runat="server" onmenuitemclick="Menu1_MenuItemClick" > ... <Items> <asp:MenuItem Text="WorkFlows"> <asp:MenuItem Text="Overview" Value="Workflow"></asp:MenuItem> <asp:MenuItem Text

How do I disable Mnemonics in a WPF MenuItem?

喜欢而已 提交于 2019-12-22 04:39:15
问题 I have dynamic strings appear as the MenuItem's header, which sometimes contains '_'. WPF treats the underscores as signs for mnemonics, but I don't want that. How do I disable that? 回答1: After trying all the solutions in the thread WPF listbox. Skip underscore symbols in strings, which didn't seem to work on MenuItems, I did this: public class EscapeMnemonicsStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {

Android: Changing visibility on menu items with changing fragment

雨燕双飞 提交于 2019-12-22 04:07:57
问题 I want to change the visibility of menu items of a fragment activity (abs) when ever I change the fragment in the activity. The fragments are SherlockListFragments. The menu items I want to show/hide are spinners I create on menu creation: public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. MenuInflater inflater = getSupportMenuInflater(); IcsSpinner herbSortSpinner = new IcsSpinner(this, null, R.attr.actionDropDownStyle);

onPrepareOptionsMenu Duplicates item in ActionBar

旧巷老猫 提交于 2019-12-21 21:27:55
问题 When I add a menu item using onPrepareOptionsMenu, the menu item duplicates its self in the action bar. I'm using fragments and creating the initial menu in the ActionBar in the main activity like this: ... @Override public boolean onCreateOptionsMenu(Menu paramMenu) { super.onCreateOptionsMenu(paramMenu); paramMenu.add(0, 1, 0, "DashBoard").setIcon(R.drawable.ic_dashboard) .setShowAsAction(1); return true; } I'm then adding another item in one of the fragments as follows: ... @Override

Dynamically add action item in action bar

戏子无情 提交于 2019-12-21 17:50:12
问题 I want to create my action menu items in the ActionBar totally dinamically for some reasons. But when I add the menu items from code, they are displayed as overflow of the setting menu item. Below there is my code. any solution? @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. //getMenuInflater().inflate(R.menu.start, menu); MenuItem logoutMI= menu.add(0,1,0,"Logout"); logoutMI.setShowAsAction(MenuItem.SHOW_AS

How do You Add Radio Buttons To Menu Items?

拥有回忆 提交于 2019-12-21 07:31:02
问题 I would like to add radio buttons to my menu items. I have seen a few answers where people were making radio buttons as the menu items. But I want my menu items to have the proper radio button that can be easily done in Winforms . To make sure I don't get the same answers as other people, here is a picture of what the menu items' radio buttons should look like: And by the way, I am using C#, WPF. 回答1: Edited Template <Window.Resources> <Style x:Key="{x:Type MenuItem}" TargetType="MenuItem">

How can a Caliburn.Micro sub menuitem click call an action on the containing view's viewmodel?

北城以北 提交于 2019-12-21 05:49:09
问题 I have a top level menu in my ShellView and when selecting a sub MenuItem, I would like to call the following method on the ShellViewModel (a Conductor.Collection.AllActive). public void SelectServer(string pServerName) { mDefaultClaimServer = pServerName; } The following does not work as no method gets called (I have tried various signatures and action parameters) - <Menu Name="menu1" DockPanel.Dock="Top"> <MenuItem Header="Select Server" Name="ClaimServers"> <MenuItem.ItemTemplate>

MenuItem keyboard shortcuts in 'pure' MVVM?

回眸只為那壹抹淺笑 提交于 2019-12-21 05:12:13
问题 All menus/contextmenus/toolbars I use in wpf are declared in ViewModel code pretty much like this: MenuService.Add( new MenuItem() { Header = "DoStuff", Command = new relayCommand( DoStuff, () => CanDoStuffExecute() ) // some more properties like parent item/image/... } ); The MenuService provides a single binding point which is a hierarchical list of MenuItem and gets bound to the actual Menu's ItemsSource in xaml. This works very well and now I'd like to add keyboard shortcuts in the same