Using the KeyTipService with Hyperlink controls

Ribbon for WPF Forum

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

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="http://mylink.com" 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 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

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 6 years ago by Paul Wilde - Senior Developer, Exponential Limited
Avatar

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 (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.