avalonia docs

ContextMenu

The ContextMenu control is a menu that can be applied to any control to provide right-click control-specfic menus.

Reference

ContextMenu

Source code

ContextMenu.cs