First, you could check out the Ribbon Preview in the WPF Toolkit by Microsoft.
Or, one general approach would be like this:
Make a
DependencyPropertyin your Window / top-level control that you can trigger off of, likeIsShowingKeyTips. Catch keyboard input to flip this as you deem appropriate.Make a
ContentControlthat has two dependency properties like 1)IsShowingKeyTipand 2)KeyTipText. Let's call thisKeyTipContentControl.Edit the
ContentControl'sControlTemplateto look how you want. Make it aCanvasor your favorite layout container, use some bindings to size it properly, maybe throw in some negativeMarginvalues.If you want to be fancy, make some
AttachedPropertieslikeKeyTip.Textto bubble them up from the plain control to theKeyTipContentControl.In your XAML, put the
ContentControlsaround theControlsyou want the KeyTips on. Set the bindings as appropriate.
You'll end up with something like this at the top level:
<Window ... >
<code:KeyTipContentControl
KeyTipText="A"
IsShowingKeyTip="{Binding IsShowingKeyTips}">
<Button x:Name="MyButtonWithKeyTip" ... />
</code:KeyTipContentControl>
</Window>
To handle the key press in an elegant fashion is not something I'm up for right now. :-)