Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Windows.Forms.Control.ContextMenuChanged event is detected but cannot be raised when event handler is attached #12842

Closed
Olina-Zhang opened this issue Jan 26, 2025 · 1 comment
Assignees
Labels
💥 regression-preview Regression from a preview release

Comments

@Olina-Zhang
Copy link
Member

Olina-Zhang commented Jan 26, 2025

.NET version

.NET 10.0 SDK: 10.0.100-alpha.1.25074.11 + binaries built from Winforms main branch

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Yes, not repro in previous .NET versions, regressed from PR: #10913

Issue description

Our automation: take a sample, for button case, when calling all button' events, the event: button1.ContextMenuChanged is detected but cannot be raised when event handler is attached. Log as following:

        _*****Testing System.Windows.Forms.Control.ContextMenuChanged
        1. Verify event raised when event handler is attached
        FAIL: Event raised 0 times.
        FAIL: Expected sender = System.Windows.Forms.Button, Text: , but got 
        2. Verify event not raised after event handler is removed
        *****_

Manual testing: call button1.ContextMenuChanged event, cannot be raised

Image

ContextMenuChangedIssue.mp4

Steps to reproduce

Mose of migrated automation cases are affected

Manual testing app:

WinFormsApp89.zip

@Olina-Zhang Olina-Zhang added untriaged The team needs to look at this issue in the next triage 💥 regression-preview Regression from a preview release labels Jan 26, 2025
@Tanya-Solyanik Tanya-Solyanik self-assigned this Jan 27, 2025
@Tanya-Solyanik Tanya-Solyanik removed the untriaged The team needs to look at this issue in the next triage label Jan 27, 2025
@Tanya-Solyanik
Copy link
Member

@Olina-Zhang - this is by design, please modify your test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💥 regression-preview Regression from a preview release
Projects
None yet
Development

No branches or pull requests

2 participants