wpf - Enabling mnemonics in button -


i read in order enable mnemonics, have turn on recognizesaccesskey on contentpresenter.
when tried code, saw text without button.

<button x:name="okbutton" content="_ok" command="{binding executecommand}">     <button.template>         <controltemplate targettype="button">             <contentpresenter recognizesaccesskey="true" />         </controltemplate>     </button.template> </button> 

probably there's way change without deleting button's default template?

this question provides answer, altough it's not same question. here's how mnemonic set , working:

<button>     <accesstext>_button</accesstext> </button> 

like in winforms done adding _ before character mnemonic key.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -