Access and Accelerator keys
Two questions regarding access keys:
How do I get the access key underlined in the menu text? Neither the underscore nor the ampersand work.
I understand it is necessary to use a keyboard handler to implement the access keys, but how do I expand the top-level menu via code? In other words, if the user presses ALT + E, the Edit menu should open. Additionally, if the user then presses the T key, the Cut Command should execute.
SIGN IN To post a reply.
1 Reply
TB
Thirupathi Bala Krishnan
Syncfusion Team
July 8, 2019 02:56 PM UTC
Hi Chris,
Thanks for contacting Syncfusion support.
Please find our response as below,
Thanks for contacting Syncfusion support.
Please find our response as below,
|
Query |
Response | |
|
How do I get the access key underlined in the menu text? Neither the underscore nor the ampersand work. |
For UWP controls, you can set the mnemonic text by focusing the specific string instead of underlining the string. While clicking the Alt button, the mnemonic text to be highlighted. Please refer the below screenshots for easy understanding. Here ‘F’ and ‘E’ are the mnemonics text. While clicking ‘F’ key, the submenu will be opened.
For more details, please refer the below msdn link:
You can achieve this requirement by setting the Accesskey for each menu item. After running your application, Pressing the Alt key initializes access key functionality and displays all currently available key combinations in Key Tips. And then invoke the AccessKeyInvoked event handler to handle the click operations of selected menu items.
Please refer the following code sample.
Please refer the attached videos from the following location: https://www.syncfusion.com/downloads/support/forum/145750/ze/Chris_SfMneu-1198438222
If the above solution does not meet your actual requirement could you please share the detailed description about your requirement, so that it could be helpful to provide the solution at the earliest. | |
|
I understand it is necessary to use a keyboard handler to implement the access keys, but how do I expand the top-level menu via code? |
You can achieve this requirement by using the IsSubMenuOpen property of menu item. Here you can expand the top level of menu items by using specific index.
Please refer the following code sample.
|
Sample link: https://www.syncfusion.com/downloads/support/forum/145750/ze/SfMenuDemo-211551402
Please let us know if you need any further assistance.
Regards,
Thirupathi B.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
CH Chris
- Jul 6, 2019 12:51 PM UTC
- Jul 8, 2019 02:56 PM UTC