Application KeyTipAccessText problem in ribbon window

Ribbon for WPF Forum

Posted 12 years ago by Muthu Krishnan
Version: 11.2.0551
Avatar

Hello,

This is the problem that we are facing with the application shortcuts in RibbonWindow.

Problem 

By default the ribbon window displays the KeyTipAccessText whenever the application receives “Alt” or “F10” key pressed event.

Our application is kind of graphics design application (like Visio / Blend design). We have requirement as in Microsoft visio where the application window should not accept any key press event when there is an design operation is in process (i.e resizing an graphic object or rotating an graphic object) . But whenever the user press “Alt” or “F10” key while an design operation is in process the main application receives the event somehow and displays the “KeyTipAccessText” for all the controls in the menu which we don’t want.

Analysis and Fix ??

I tried using “OnPreviewKeyDown” event in the ribbon window class to handle the event (Just did "e.Handled = true"). This just works fine for the first time I press the “Alt” or “F10” key not the second when the design operation is in process. I am not sure this is the correct way of implementing our requirement ?                (I have checked the RibbonWindow API which is not doing anything on “OnPreviewKeyDown”. So I don’t know where the logic for displaying the KeyTipAccessText is called ?)

My question is “Is there way to control when the KeyTipAccessText should be displayed?”.

Can you help me by providing some references that i can use ?

Comments (3)

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

Hi Muthu,

We have a Ribbon.KeyTipModeShortcuts property that is a flags enum you can set to determine whether to allow either Alt, or F10 to toggle key tip mode.  That should help handle what you're trying to do if you set it to None.


Actipro Software Support

Posted 11 years ago by Andras Eles
Avatar

Following up on this issue. We have used the suggested method to disable the ribbon handling the ALT key. It works in most of the scenarios except one.

1. Start a design operation (like resize or move of a graphic object) via mouse event. Here we set Ribbon.KeyTipModeShortcuts to None

2. Press Down the ALT key to alter the behavior of the design operation. E.g. switch to centrical resize mode.

3. Finish the design operation by relesing the mouse button. Here we set the Ribbon.KeyTipModeShortcuts to All.

4. Release the ALT key. 

At this point the focus is moved onto the ribbon with all the KeyTipAccessText displayed. We would expect that the focus remained on our graphics object. If we change the order of step 2 and 1 the application behaves the expected way.

What is the reason of the difference? Is there anything we can do to achieve uniform behavior?

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

Hi Andras,

Thanks for writing.  I think I see where the problem for this may lie.  I've adjusted this for the next maintenance release to hopefully help.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.