Makes PropertyGrid for CoboBox show "(none)" when DataSource is null …#13860
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13860 +/- ##
===================================================
- Coverage 77.12127% 77.11928% -0.00199%
===================================================
Files 3273 3275 +2
Lines 644931 644936 +5
Branches 47692 47695 +3
===================================================
- Hits 497379 497370 -9
- Misses 143876 143892 +16
+ Partials 3676 3674 -2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Epica3055
reviewed
Sep 12, 2025
9120a2b to
c99c9b8
Compare
KlausLoeffelmann
approved these changes
Oct 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12570
Root Cause
The
ComboBox.DataSourceproperty was missing aTypeConverterto handle null value display inPropertyGrid. WhenDataSourceis null,PropertyGridshows empty/blank instead of "(none)" text, breaking consistency with .NET Framework behavior and other similar properties likeDisplayMemberandValueMember.Proposed changes
DataSourceConverterclass that inherits fromReferenceConverterand converts null values to "(none)" for string displayTypeConverterattribute toComboBox.DataSourceproperty to use the new converterCustomer Impact
Restores .NET Framework parity for PropertyGrid display. Developers using
PropertyGridto inspectComboBoxproperties will now see consistent "(none)" text whenDataSourceis null, improving design-time experience.Regression?
No. This is a missing feature/behavior that existed in .NET Framework but was lost in .NET Core migration.
Risk
Minimal.
Screenshots
Before
After
Test methodology
DataSourceConvertercovering null conversion, culture handling, and edge casesPropertyGridandComboBoxto verify "(none)" displayTest environment(s)
Microsoft Reviewers: Open in CodeFlow