# ContextMenuService.OnClose -\> Can ' t Capture Action

**URL:** <https://forum.radzen.com/t/contextmenuservice-onclose-can-t-capture-action/11877>\
**Category:** Radzen.Blazor Components\
**Created:** [September 30, 2022, 7:43am UTC](https://forum.radzen.com/t/contextmenuservice-onclose-can-t-capture-action/11877 "2022-09-30T07:43:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Javier1](https://forum.radzen.com/user_avatar/forum.radzen.com/javier1/32/18375_2.png) [@Javier1](https://forum.radzen.com/u/Javier1)\
**Post date:** [September 30, 2022, 7:43am UTC](https://forum.radzen.com/t/contextmenuservice-onclose-can-t-capture-action/11877/1 "2022-09-30T07:43:25Z")

</div>

Good morning.  
I am experimenting with the .

I would like to know when I have an open menu in order to disable for example the tooltips.

For this I have associated the actions of the ContextMenuService:

ContextMenuService.OnClose += ContextMenu\_OnClose;  
ContextMenuService.OnOpen += ContextMenu\_OnOpen;

void ContextMenu\_OnClose()  
{  
Console.WriteLine("close");  
}

```
    void ContextMenu_OnOpen(MouseEventArgs args, ContextMenu_OnOpen(MouseEventArgs args, ContextMenuOptions options).
    {
        Console.WriteLine("Open");
    }

```

The problem comes when I right click and the context menu pops up, it fires OnOpen correctly, when I don't choose any option and click on any other place the context menu hides but it doesn't fire the OnClose.

Do you know how to capture this action ?

Best regards and thanks for everything

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [September 30, 2022, 8:09am UTC](https://forum.radzen.com/t/contextmenuservice-onclose-can-t-capture-action/11877/2 "2022-09-30T08:09:15Z")

</div>

It will be part of our next update early next week:

> <https://github.com/radzenhq/radzen-blazor/commit/0e887d8b28c60cbc29661d97034f02bb445fdfcf>
