Press F1 for help example

3 posts, 0 answers
  1. Shawn
    Shawn avatar
    48 posts
    Member since:
    Jul 2012

    Posted 14 Mar 2014 Link to this post

    In the Q1-2014 release notes, it is mentioned that the screentip now supports "Press F1 for help" functionality but I am not able to find an example in the documentation nor online. Can you point me to a working example or documentation that outlines this feature.

  2. Martin Ivanov
    Martin Ivanov avatar
    1590 posts

    Posted 19 Mar 2014 Link to this post

    Hello Shawn,

    In order to perform an action when you press F1 you can create a new DelegateCommand which opens a new window (or a page) with the help information on execute. Then you can add a KeyBinding in order to use the F1 key and bind the command to the HelpCommand property of the RadRibbonView. Here is an example in code:
    public partial class MainPage : UserControl
        public MainPage()
            OpenHelpPageCommand = new DelegateCommand(ExecuteOpenHelpPage);
            this.DataContext = OpenHelpPageCommand;
            InputBindingCollection inputBindCollection = new InputBindingCollection();
            inputBindCollection.Add(new KeyBinding(this.OpenHelpPageCommand,new KeyGesture(Key.F1)));
            CommandManager.SetInputBindings(this, inputBindCollection);
        private void ExecuteOpenHelpPage(object obj)
            var helpWindow = MyHelpWindow.Instance;
        public DelegateCommand OpenHelpPageCommand { get; set; }
    Here is the Xaml definition:
    <telerik:RadRibbonView HelpButtonVisibility="Visible" HelpCommand="{Binding}" HelpButtonStyle="{StaticResource helpButtonStyle}" />

    To show the screen tip of the help button you can define a style which sets the tip.
        <Style x:Key="helpButtonStyle" TargetType="telerik:RadButton">
            <Setter Property="telerik:ScreenTip.Title" Value="Press F1 for help" />

    For your convenience I prepared a sample project which you could use as a sample implementation of your requirement.


    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  3. Wayne
    Wayne avatar
    10 posts
    Member since:
    Feb 2015

    Posted 05 May 2016 in reply to Martin Ivanov Link to this post

    For reference, if you want the Telerik RadRibbonView Help button to work (do something when you click on it), then make sure to not do the obvious (set your help ICommand on the ribbon HelpButton.Command property), but instead do the less obvious step of setting the HelpCommand property on the ribbon instead. Hopefully this saves someone else the 20 minutes I just wasted wondering why the Help button refused to work like every other button does.
Back to Top