Imagebutton is a hybrid consisting of image and text. See here:
- http://blogs.msdn.com/b/knom/archive/2007/10/31/wpf-control-development-3-ways-to-build-an-imagebutton.aspx
- http://www.hardcodet.net/2009/01/create-wpf-image-button-through-attached-properties
I use the first method because it is most straightforward for me.
Now, the problem is I would like to have an accelerator for such button which would behave exactly like accelerator for a normal button.
I tried to register access key and use textblock for displaying text, but then I am unable to show underscore. When I use label instead of textblock then I get underscore, but label treats it as access key on its own overriding registered access key for button -- so when I press it the label is just focused, but there is no "click" action for button.
How to have both worlds -- underscore when [alt] is pressed and "click" action for button?
Thank you in advance for help.