dotnet / dotnet/wpf

DataGrid ContextMenu flickers on consecutive right-click actions

Open
#11,741 3 comments 0 reactions 1 assignee Claimed by @h3xds1nz View on GitHub
PR Proposed
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Describe the bug

In the DataGrid control, a ContextMenu is displayed for data rows when the user right-clicks on a cell. However, when the user repeatedly right-clicks on different cells, the ContextMenu flickers. Instead of closing and reopening smoothly, it appears to open twice, resulting in a noticeable flickering effect.

### Replication steps

1. Run the sample application.
2. Right-click on any cell to display the ContextMenu.
3. Right-click on a different cell while the ContextMenu is still open.

### Expected behavior

The ContextMenu should be displayed smoothly without any flickering.

### Screenshots

https://github.com/user-attachments/assets/b91e3abb-c315-4484-9984-53ca6db5806f

### Windows version
_No response_

### Additional context
_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.