How to add a keyboard short cut

3 posts, 1 answers
  1. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 29 Oct 2010 Link to this post

    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. Answer
    Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 02 Nov 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jon
    Jon avatar
    539 posts
    Member since:
    Apr 2004

    Posted 02 Nov 2010 Link to this post

    Thanks!
Back to Top