I have a Telerik RadSplitButton defined as follows:
I am using the NoXaml version of the assemblies and so I have styled the split button based on a style that I got from a Telerik theme (Telerik.Windows.Controls.xaml file). The style contains the following:
When I use the Tab-Navigation to cycle through the controls on the page (because I have no mouse for example), this RadSplitButton gets the focus as expected. So far so good. However, when I then try to interact with this RadSplitButton using the keyboard (because I have no mouse) I can't seem to get the main button to activate and I cannot change the selected item in the drop-down.
When the RadSplitButton has focus:
- When I press the Spacebar or the Enter key, the drop-down opens but no events fires. I would expect the button to get clicked or the Activate event to get fired.
- When I press the down-arrow key the drop-down opens and shows me the list box but the list box does not get keyboard focus and so I cannot navigate (using keys). I cannot select an item from the drop-down as I can with a normal list box.
Can you suggest some changes that might help me to fix this? Ideally, I would like to do this from the style and not have to add event handlers to every SplitButton.
Thanks
<telerik:RadSplitButton Style="{StaticResource MySplitButtonStyle}" Content="Some Text" DropDownHeight="150">
<telerik:RadSplitButton.DropDownContent>
<ListBox>
<ListBoxItem Content="Item 1" />
<ListBoxItem Content="Item 2" />
<ListBoxItem Content="Item 3" />
<ListBoxItem Content="Item 4" />
<ListBoxItem Content="Item 5" />
</ListBox>
</telerik:RadSplitButton.DropDownContent>
</telerik:RadSplitButton>
<Style x:Key="MySplitButtonStyle" TargetType="telerik:RadSplitButton">
...
<Setter Property="ButtonPartStyle" Value="{StaticResource MyButtonStyle}"/>
<Setter Property="IsToggle" Value="False"/>
<Setter Property="IsTabStop" Value="True" />
<Setter Property="IsOpen" Value="False" />
<Setter Property="CloseOnPopupMouseLeftButtonUp" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:RadSplitButton">
...
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
When I use the Tab-Navigation to cycle through the controls on the page (because I have no mouse for example), this RadSplitButton gets the focus as expected. So far so good. However, when I then try to interact with this RadSplitButton using the keyboard (because I have no mouse) I can't seem to get the main button to activate and I cannot change the selected item in the drop-down.
When the RadSplitButton has focus:
- When I press the Spacebar or the Enter key, the drop-down opens but no events fires. I would expect the button to get clicked or the Activate event to get fired.
- When I press the down-arrow key the drop-down opens and shows me the list box but the list box does not get keyboard focus and so I cannot navigate (using keys). I cannot select an item from the drop-down as I can with a normal list box.
Can you suggest some changes that might help me to fix this? Ideally, I would like to do this from the style and not have to add event handlers to every SplitButton.
Thanks