This is a migrated thread and some comments may be shown as answers.

ApplicationMenu not closing with KeyTip

2 Answers 103 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Usman
Top achievements
Rank 1
Usman asked on 20 Apr 2016, 04:23 PM

Hi,

I am running the following xaml:

<Grid><br>        <telerik:RadRibbonView telerik:KeyTipService.IsKeyTipsEnabled="True"><br>            <telerik:RadRibbonView.ApplicationMenu><br>                <telerik:ApplicationMenu telerik:KeyTipService.AccessText="F"><br>                    <telerik:RadRibbonButton Content="New" telerik:KeyTipService.AltAccessText="N"/><br>                </telerik:ApplicationMenu><br>            </telerik:RadRibbonView.ApplicationMenu><br>        </telerik:RadRibbonView><br>    </Grid><br>

 

When I do "Alt+F", it opens the main menu like it should, but then if I press "N" alone, it clicks the button but does not close the application menu (and the access key disappears too). If I press "Alt+N", it closes the application menu promptly. My question is how do I close the application menu on just "N" alone?

Any ideas?

Best

2 Answers, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 22 Apr 2016, 01:41 PM
Hello Usman,

I can confirm that this is an issue in RadRibbonView. I logged it in our feedback portal where you can track its status and I also updated your Telerik points as a small gesture of gratitude for reporting this.

As a workaround you can close the ApplicationMenu when the button is activated. You can do that in the KeyDown event handler of the ribbonview control.
private void xRibbon_KeyDown(object sender, KeyEventArgs e)
{
    if (xRibbon.IsApplicationMenuOpen && e.Key == Key.N)
    {
        xRibbon.IsApplicationMenuOpen = false;
    }
}

Or in the Activate event of the keytip service.

<telerik:RadRibbonButton Content="New" telerik:KeyTipService.AccessText="N">
    <telerik:KeyTipService.Activation>
        <telerik:KeyTipActivation Activated="KeyTipActivation_Activated"  />
    </telerik:KeyTipService.Activation>
</telerik:RadRibbonButton>

private void KeyTipActivation_Activated(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    this.ribbonView.IsApplicationMenuOpen = false;
}

Regards,
Martin
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Usman
Top achievements
Rank 1
answered on 22 Apr 2016, 07:34 PM
Thanks Martin, will do with the workaround for now then!
Tags
RibbonView and RibbonWindow
Asked by
Usman
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Usman
Top achievements
Rank 1
Share this question
or