Problems with KeyTipAccessText in context menus

Ribbon for WPF Forum

Posted 10 years ago by Phil Devaney
Version: 13.2.0590
Platform: .NET 4.5
Environment: Windows 7 (32-bit)
Avatar

Our application uses data bound ribbon context menus (i.e. binding ItemsSource with a DataTemplate to create Buttons etc) and we've discovered that access keys aren't working properly. If I set KeyTipAccessText in the template then the correct letter is underlined in the menu, but pressing the key does nothing. Using the cursor keys/enter to navigate the menu works OK, so I don't think its a focus issue. A menu that is defined directly in XAML works OK. Is this a bug, or are we just missing a property somewhere?

There are also a couple of inconsistencies with standard WPF context menus that I noticed:

- If two menu items are defined with the same access key, the standard menu cycles between them when pressing the key and you have to press Enter to select it. The ribbon context menu just activates the first item when the key is pressed.

- The access key underlines are always visible in a ribbon context menu, unliked a standard menu when they only appear if you invoke the menu from the keyboard (I think there is a setting for this in Contrl Panel somewhere).

I've sent a sample demonstrating the problem to support

Comments (3)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Phil,

Thanks for the sample.  We've fixed the access keys with DataTemplate issue and the toggle between items issues for the next maintenance release.  For the other request, we haven't yet seen a way to know if the keyboard invoked the menu, so that might not be possible.


Actipro Software Support

Posted 10 years ago by Phil Devaney
Avatar

Thanks, the first problem was the most important one, I doubt most people would notice the underline issue! If it helps, the ContextMenuOpening event has the positions as (-1, -1) if the menu was invoked from the keyboard.

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Phil,

That's a good point, we never knew that.  But unfortunately it doesn't look like there is an OnOpening method or anything on ContextMenu itself.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.