tags:

views:

213

answers:

0

I am using ribbondropdownbutton from wpf toolkits ribboncontrol. Is there a way to activate the drop down menu via a keyboard shortcut like Alt-S?

<r:RibbonDropDownButton Name="searchDropDown" Command="{StaticResource SearchCommand}" 
   ItemsSource="{Binding Source={StaticResource SearchFilter}}" 
   ItemTemplate="{StaticResource SearchTemplate}" 
   MenuItem.Click="RibbonDropDownButton_Click" />

<r:RibbonCommand  x:Key="SearchCommand"      
       LabelTitle="View"
      ToolTipDescription="Select a Search (Alt-S)"
      ToolTipTitle="Search"
      SmallImageSource="search.png"
      LargeImageSource="search.png"/>

<CommandBinding Command="{StaticResource SearchCommand}" 
                Executed="SearchCommand_Executed" 
                CanExecute="SearchCommand_CanExecute" />     
<r:RibbonWindow.InputBindings>
    <KeyBinding Command="{StaticResource SearchCommand}" Key="S" Modifiers="Alt"/>
</r:RibbonWindow.InputBindings>

What happens is when you press Alt-S it fires SearchCommand_Executed, however I want the ribbondropdown to show its drop down items when you press Alt-S