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

How to add a keyboard short cut

2 Answers 225 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 29 Oct 2010, 10:42 PM
Hi..
I have the following RadButton.. how can I add CTRL+N to fire it too?  thanks

 

 

<telerikPresentation:RadButton BorderBrush="Blue" BorderThickness="1" ClickMode="Press" FontSize="20" Margin="162,0,0,9" Name="btnNew" Click="btnNew_Click" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="90">

 

 

 

<telerikPresentation:RadButton.Effect>

 

 

 

<DropShadowEffect ShadowDepth="5" />

 

 

 

</telerikPresentation:RadButton.Effect>

 

 

 

<StackPanel Height="28" HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Top" Width="81" >

 

 

 

<Image Height="28" Source="/icons/truck_blue.png" Width="30" />

 

 

 

<TextBlock FontSize="14" Foreground="Navy" Margin="9,0,0,0" Text="New" OverridesDefaultStyle="True" Height="27" Width="37" />

 

 

 

</StackPanel>

 

 

 

</telerikPresentation:RadButton>

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Zarko
Telerik team
answered on 02 Nov 2010, 02:20 PM
Hello Jon,

 The easiest way to achieve this is to use a command. I've attached you a sample project so could you please examine it and if you have further questions feel free to ask?
Note that in order for the command to fire the UIElement that holds the InputBindings should be focused.

Best wishes,
Zarko
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Jon
Top achievements
Rank 1
answered on 02 Nov 2010, 08:34 PM
Thanks!
Tags
Buttons
Asked by
Jon
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Jon
Top achievements
Rank 1
Share this question
or