-
Notifications
You must be signed in to change notification settings - Fork 997
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
In DemoConsole app, all tagPages are empty without controls displayed #11095
Comments
This issue caused by the PR #11081, PR changed null! to String.Empty at winforms/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerHost.cs Line 922 in 32bc644
winforms/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerHost.cs Lines 369 to 386 in 32bc644
|
Thanks @LeafShi1, if you want to change the condition on line 386 to be null or empty that would be great. :) |
I think that the correct fix is to change nullability in Container.CreateSite method, but we don't own it. Null is a valid input and it implies that container (designer host) should try to create a new name for the component. Empty string means that component does not have a name, and we should not attempt to create one. I don't remember what scenario this is. |
@Tanya-Solyanik What is the bad in creating a name for string.Empty? Can you provide any context on why not having a name is important? |
@JeremyKuhne - potentially we will be attempting to create a name multiple times in the case when the naming service is not available. Not all components are named, some inner ones are not. This is a protected virtual method, we don't know what assumption the overriders make when they call the base method, but it's reasonable to assume that anyone who implements DesignerHost or Container assumes the same behavior as in the InProc designer. We don't have sufficient test base to validate all design time scenarios in this repo, we will not see immediate failures, but this change has a potential to prevent migration.
No, I don't remember the specific scenario |
Verified this issue on winforms repo from main branch, it was fixed, now all tabPages show the controls. 11095.mp4 |
.NET version
.Net 9.0: Main branch of Winforms repo
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Yes, it is a regression issue, last week for Winforms repo testing, we can see controls in tabPages of DemoConsole test app
Issue description
In DemoConsole test app of Winforms repo, when running it, all tabPages are empty without controls displayed as following:
DemoConsoleIssue.mp4
Steps to reproduce
Test sample: DemoConsole in Winforms repo
The text was updated successfully, but these errors were encountered: