Hello,
After investigation and testing, this feature was not possible for the following reasons:
- Unable to get the DOM element from the MenuFlyoutItem event when right clicked.
- CSS style changes to HTML elements cannot be done in MenuFlyoutItem event.
For this feature, it is recommended that you implement an HTML-based right-click menu in your blazor page and complete styling changes to page elements through onmousedown event and Javascript.
Please refer to ASP.NET Core Blazor JavaScript interoperability for more details about how to invoke JS in Blazor.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.