New to Telerik UI for WinFormsStart a free 30-day trial

Customizing the Key Tips

Updated over 6 months ago

The key tips displayed by RadRibbonBar can be customized so that they are shown at special locations with modified styles.

Figure 1: Custom Key Tips

WinForms RadRibbonBar Custom Key Tips

Figure 2: Default Key Tips

WinForms RadRibbonBar Default Key Tips

KeyTipShowing Event

The key tip`s location and styles can be modified in the event handler of the KeyTipShowing event. The additional parameters allowing these modifications are exposed by the event arguments which need to be cast to RadKeyTipShowingEventArgs

  • RadKeyTipShowingEventArgs.CustomLocation: Defines the coordinates at which the key tip will be shown.

  • RadKeyTipShowingEventArgs.Font: Gets or sets the font used to paint the text of the key tip.

  • RadKeyTipShowingEventArgs.BackColor: Gets or sets the back color used to paint the background of the key tip.

  • RadKeyTipShowingEventArgs.BorderColor: Determines the border color used to paint the borders of the key tip.

  • RadKeyTipShowingEventArgs.ForeColor: Gets or sets the color used to paint the text of the key tip.

Handling the KeyTipShowing Event

C#
Font f = new Font("Calibri", 12f, FontStyle.Regular);
private void RadRibbonBar1_KeyTipShowing(object sender, CancelEventArgs e)
{
    RadKeyTipShowingEventArgs args = e as RadKeyTipShowingEventArgs;
    args.BackColor = Color.FromArgb(125, 173, 224, 0);
    args.BorderColor = Color.LightBlue;
    args.ForeColor = Color.Brown;
    args.Font = f;
    Point location = Point.Empty;
    if (sender == this.coverPagesButton || sender == this.blankPageButton || sender == this.pageBreakButton)
    {
        location = new Point(args.CustomLocation.X + 15, args.CustomLocation.Y - 5);
    }
    else
    {
        location = new Point(args.CustomLocation.X, args.CustomLocation.Y + 15);
    }
    args.CustomLocation = location;
}

Key tips can also be displayed by the backstage view. The KeyTipShowing event needs to be subscribed on the RadRibbonBarBackstageView object.

See Also

In this article
KeyTipShowing EventSee Also
Not finding the help you need?
Contact Support