Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix 13227: Update SetName of DesignerExtenders.NameExtenderProvider to virtual method #13558

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
Loading
from

Conversation

LeafShi1
Copy link
Member

@LeafShi1 LeafShi1 commented Jun 5, 2025

Fixes #13227

Proposed changes

  • Change SetName of DesignerExtenders.NameExtenderProvider from static to virtual method

Customer Impact

  • Enable Name property for all controls in DemoConsole

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

In DemoConsole test app of WinForms repo, Name property for all controls is disabled
.NET 10:

Image

After

Name property for all controls is enabled

image

Test methodology

  • Manually

Test environment(s)

  • .net 10.0.0-preview.6.25303.102
Microsoft Reviewers: Open in CodeFlow

@LeafShi1 LeafShi1 requested a review from a team as a code owner June 5, 2025 09:43
@LeafShi1 LeafShi1 requested review from Copilot and JeremyKuhne and removed request for a team June 5, 2025 09:43
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the SetName method in DesignerExtenders.NameExtenderProvider from static to virtual to enable the Name property for all controls in DemoConsole.

  • Changed SetName from static to virtual to support runtime polymorphism.
Comments suppressed due to low confidence (1)

src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/DesignerExtenders.NameExtenderProvider.cs:91

  • Changing SetName from static to virtual can impact existing callers that depend on static invocation. Verify that all usages of SetName are updated to appropriately handle instance-based calls.
public virtual void SetName(IComponent comp, string newName)

Copy link
Member

@Epica3055 Epica3055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.59677%. Comparing base (d1eeebe) to head (340d0e8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13558         +/-   ##
===================================================
- Coverage   76.59927%   76.59677%   -0.00250%     
===================================================
  Files           3230        3230                 
  Lines         639151      639151                 
  Branches       47295       47295                 
===================================================
- Hits          489585      489569         -16     
- Misses        145994      146009         +15     
- Partials        3572        3573          +1     
Flag Coverage Δ
Debug 76.59677% <ø> (-0.00250%) ⬇️
integration 18.79468% <ø> (-0.00105%) ⬇️
production 51.00037% <ø> (-0.00559%) ⬇️
test 97.40411% <ø> (ø)
unit 48.39355% <ø> (-0.00943%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name property for all controls is disabled in DemoConsole application
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.