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

RadRibbonView QuickAccessToolbar OverflowPanel AccessKeys

5 Answers 50 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 2
Paul asked on 14 Nov 2018, 08:12 PM

Telerik Team,

I have a customer who has assigned many items to their QuickAccessToolbar. So many so that there are more than can be displayed on the screen at one time. The remaining items get put into the overflow panel that is accessed by clicking the RadRibbonDropDownButton. This customer prefers to access these QuickAccessToolbar items with their keyboard, so they press left-alt to bring up the AccessText. I have figured out through code how to add AccessText to the drop down button, but I can't figure out how to then have the items in the overflow window display their access keys automatically when the overflow window is opened and be available for selection.

Here is how I am assigning the AccessKey to the drop down. I would prefer to do it in xaml if possible, but I couldn’t figure that out.

private void RadRibbonView_Loaded(object sender, RoutedEventArgs e)
{
  var ribbon = sender as RadRibbonView;
  var qat = ribbon.QuickAccessToolBar;
  var dropDownButton = qat.FindChildByType<RadRibbonDropDownButton>();
  if (dropDownButton != null)
  {
    KeyTipService.SetAccessText(dropDownButton, "00");
  }
}

We are using the 2015.3.930.40 (No XAML) version of your controls.

Any help would be appreciated.

Thanks,
Paul

5 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 19 Nov 2018, 03:30 PM
Hello Paul,

This does seem to be a bug at our end but I will require a little more time to investigate its exact cause and confirm this.

For the time being, I can suggest the following workaround to show the required screen tips.

private void RadRibbonView_Loaded(object sender, RoutedEventArgs e)
{
    var ribbon = sender as RadRibbonView;
    var qat = ribbon.QuickAccessToolBar;
    var dropDownButton = qat.FindChildByType<RadRibbonDropDownButton>();
    if (dropDownButton != null)
    {
        KeyTipService.SetAccessText(dropDownButton, "00");
        dropDownButton.DropDownOpened += DropDownButton_DropDownOpened;
    }
}
 
private void DropDownButton_DropDownOpened(object sender, RoutedEventArgs e)
{
    var dropdown = sender as RadRibbonDropDownButton;
    var service = typeof(KeyTipService).GetField("keytipServiceReference", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static).GetValue(null) as KeyTipService;
    service.GetType().GetMethod("ShowChildrenTips", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).Invoke(service, new object[] { dropdown });
}

Please let me know whether such an approach would work for you for the time being.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Paul
Top achievements
Rank 2
answered on 19 Nov 2018, 06:07 PM

Dilyan,

Thanks for the reply. Your solution solves most of the issues. However, when the user types one of the access keys from the drop down window the events fire which is good, but the drop down window remains open. The user has to press the escape key or click somewhere else with their mouse in order for it to close. This is somewhat disorienting. 

We are choosing at this time to not implement the workaround in our product. 

Please let me know what you find out from your further research.

Thanks,

Paul

0
Dilyan Traykov
Telerik team
answered on 20 Nov 2018, 11:23 AM
Hello Paul,

I want to let you know that I've logged the following bug report in our feedback portal regarding this issue. You can subscribe to it to get notified about any changes in its status.

To thank you for your help in finding this issue, I've awarded you with some Telerik points.

As for the proposed workaround, you will need to close the dropdown content in the click/command handler:

private void RadRibbonButton_Click(object sender, RoutedEventArgs e)
{
    var qat = ribbon.QuickAccessToolBar;
    var dropDownButton = qat.FindChildByType<RadRibbonDropDownButton>();
    if (dropDownButton != null)
    {
        dropDownButton.IsOpen = false;
    }
}

I do hope you find such an approach applicable for the time being.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Paul
Top achievements
Rank 2
answered on 21 Nov 2018, 02:14 PM

Dilyan,

Thanks for the additional details showing how to close the window. I went ahead and implemented the workaround in our product yesterday.

This will make our customer very happy. Thanks man!

Paul

0
Dilyan Traykov
Telerik team
answered on 21 Nov 2018, 02:35 PM
Hello Paul,

Glad to be of help! If I can be of any further assistance, please let me know.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
RibbonView and RibbonWindow
Asked by
Paul
Top achievements
Rank 2
Answers by
Dilyan Traykov
Telerik team
Paul
Top achievements
Rank 2
Share this question
or