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

RadRibbonDropDown

2 Answers 14 Views
RibbonView and RibbonWindow
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 15 Jan 2016, 03:51 AM
Is there a way to make the KeyTipService work for the items in a listbox on a RadRibbonDropDownButton?

2 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 19 Jan 2016, 10:32 PM
Hello Anthony,

I will contact you tomorrow with more information on the matter.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Martin Ivanov
Telerik team
answered on 21 Jan 2016, 01:38 PM
Hello Anthony,

You can use the KeyTipService navigation with a ListBox control. If you set the KeyTipService.AcessText property on a ListBoxItem (or the ListBox itself), the service will be able to navigate to the control, but its internal logic won't know what action to execute. However, you can subscribe the ListBox to the KeyTipService's Activation event and implement the behavior which should be executed when the specific key is pressed.

Here is an example in code:
<telerik:RadRibbonView telerik:KeyTipService.IsKeyTipsEnabled="True">
    <telerik:RadRibbonTab Header="Home" telerik:KeyTipService.AccessText="A">
        <telerik:RadRibbonGroup>
            <telerik:RadRibbonDropDownButton Text="ListBoxButton" telerik:KeyTipService.AccessText="S">
                <telerik:RadRibbonDropDownButton.DropDownContent>
                    <ListBox>
                        <ListBoxItem Content="Item 1" telerik:KeyTipService.AccessText="D">
                            <telerik:KeyTipService.Activation>
                                <telerik:KeyTipActivation Activated="KeyTipActivation_Activated" />
                            </telerik:KeyTipService.Activation>
                        </ListBoxItem>
                        <ListBoxItem Content="Item 2" />
                        <ListBoxItem Content="Item 3" />
                    </ListBox>
                </telerik:RadRibbonDropDownButton.DropDownContent>
            </telerik:RadRibbonDropDownButton>
        </telerik:RadRibbonGroup>
    </telerik:RadRibbonTab>
</telerik:RadRibbonView>

private void KeyTipActivation_Activated(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    var listBoxItem = (ListBoxItem)e.OriginalSource;
    listBoxItem.IsSelected = true;
}

I hope this information helps.

Regards,
Martin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
RibbonView and RibbonWindow
Asked by
Anthony
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or