How to find the prototype for handlers

Hi everyone,

Is there a way to know (through documentation or other methods) which is the prototype for an handler method?

For instance, if i want to use:

<ContextMenuEvents OnOpen="OnOpenSingle" Opened="OpenedSingle"></ContextMenuEvents>

I then have to define the methods "OnOpenSingle" and "OpenedSingle" in c# code... but with which parameters? (not all of such methods have zero parameters)

Where or how can i find this information? In the current documentation it is not specified and VisualStudio 2019 does not help me.

Thanks in advance for your response.



1 Reply 1 reply marked as answer

MK Mohan Kumar Ramasamy Syncfusion Team October 5, 2020 01:28 PM UTC

Hi M 
 
Sorry for the inconvenience caused.  
 
We have checked your reported query. You can use the MenuEvents instead of ContextMenuEvents . Please find the below code snippet for reference. 
 
 
<div class="control-section"> 
    <div class="contextmenu-control"> 
        <div id="contextmenutarget">Right click/Touch hold to open the ContextMenu</div> 
        <SfContextMenu Target="#contextmenutarget" Items="@MenuItems"> 
            <MenuEvents OnOpen="OnOpenSingle" Opened="OpenedSingle" TValue="MenuItem"></MenuEvents> 
        </SfContextMenu> 
    </div> 
</div> 
@code{ 
 
    private void OnOpenSingle(BeforeOpenCloseMenuEventArgs<MenuItem> args) 
    { 
 
    } 
    private void OpenedSingle(OpenCloseMenuEventArgs<MenuItem> args) 
    { 
 
    } 
} 
 
For your reference, we have prepared a sample based on this, please refer below link. 
 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Mohan kumar R 


Marked as answer
Loader.
Up arrow icon