I want to use an access key on the label to trigger the opening of the dropdown menu. In my case, the label is "Appl_y Template" and I want to press Alt+Y to open the menu. The window is opened via ShowDialog() method. I modified the template and change the TextBlock to a Label control. But I don't know what the target is? How to trigger the dropdown menu from the template? Could you assist me with this?
HNHarinath Navaneethakrishnan Syncfusion Team December 7, 2022 03:07 PM UTC
It is not possible to open the dropdownmenu using the access keys. However, your requirement can be achieved by focusing the DropDownButtonAdv using the access keys and opening the drop-down in the OnGotFocus event. Please refer to the sample for your reference
Thanks for your help. Your sample does work when accessing the drop down button using the access key but breaks the mouse behaviour. When you click the button with the mouse, the drop down menu opens and immediately closes. You must click the mouse again to open the menu. This is not a good solution. Is there a way to detect whether the control is clicked using a mouse in the GotFocus event?
GTGokul Thanudhas Syncfusion Team December 9, 2022 03:57 PM UTC
You can achieve your requirement by detecting whether the key is pressed in the GotFocus event. Please refer the sample for your reference.