Using the KeyTipService with Hyperlink controls

Ribbon for WPF Forum

Posted 12 years ago by Paul Wilde - Senior Developer, Exponential Limited
Version: 12.2.0571

I'm trying to attach a key tip to a hyperlink, but it's not working out. Using this code:

<TextBlock><Hyperlink x:Name="MyLink" ribbon:KeyTipService.KeyTipAccessText="L" NavigateUri="" RequestNavigate="Link_RequestNavigate"><Run Text="MyLink"/></Hyperlink></TextBlock>

nothing is displayed over the hyperlink when key tip mode is entered. If I set the service attribute on the parent text block instead, the key tip is displayed as expected, but the RequestNavigate event isn't fired when the key is pressed.

What's the best way to get this to work?

Comments (2)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Paul,

HyperLink isn't a control (like TextBlock) so it won't work there.  Right now, controls that can show key tips need to implement an IKeyTipTarget interface as well, that lets controls get notified of the key tips access.  But it looks like it's internal at the moment, meaning that external controls wouldn't be able to properly support key tips.  We can make it public for the next maintenance release.

Actipro Software Support

Posted 12 years ago by Paul Wilde - Senior Developer, Exponential Limited

Ah, that's a shame - I was hoping we'd be able to use the keytips service to extend the native WPF controls in our non-ribbon dialogs and get key tips functionality for free.

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.