Skip to content

Restore "Use Data Bound Items" support in ListBox/ComboBox Smart Tags #13552

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

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

Conversation

ricardobossan
Copy link
Member

@ricardobossan ricardobossan commented Jun 3, 2025

Fixes #13228

Root Cause

The ListBox and ComboBox Smart Tag panels no longer displayed the "Use Data Bound Items" checkbox in .NET 5+ because the logic responsible for detecting and handling data binding (previously in ListControlBoundActionList) was removed and replaced with a simplified ListControlUnboundActionList. This stripped out support for toggling between bound and unbound modes, as well as the associated UI elements and property editing.

Proposed changes

  • Reintroduce BoundMode, DataSource, DisplayMember, ValueMember, and BoundSelectedValue properties.
  • Conditionally show data-bound or unbound actions in the Smart Tag panel based on the control's current binding state.
  • Preserve existing "Edit Items..." dialog behavior for unbound scenarios.

Customer Impact

Developers using the WinForms Designer in .NET 5+ will be able to configure data binding for ListBox and ComboBox controls through the Smart Tag UI.

Regression?

  • No

Risk

  • Minimal

Screenshots

Before

After

Test methodology

  • Manual

Test environment(s)

  • 10.0.100-preview.6.25272.112
Microsoft Reviewers: Open in CodeFlow

Fixes dotnet#13228

## Root Cause

The `ListBox` and `ComboBox` Smart Tag panels no longer displayed the
"Use Data Bound Items" checkbox in .NET 5+ because the logic responsible
for detecting and handling data binding (previously in
`ListControlBoundActionList`) was removed and replaced with a simplified
`ListControlUnboundActionList`. This stripped out support for toggling
between bound and unbound modes, as well as the associated UI elements
and property editing.

## Proposed changes

- Reintroduce `BoundMode`, `DataSource`, `DisplayMember`, `ValueMember`,
and `BoundSelectedValue` properties.
- Conditionally show data-bound or unbound actions in the Smart Tag
panel based on the control's current binding state.
- Preserve existing "Edit Items..." dialog behavior for unbound
scenarios.

## Customer Impact

Developers using the WinForms Designer in .NET 5+ will be able to
configure data binding for `ListBox` and `ComboBox` controls through the
Smart Tag UI.

## Regression?

- No

## Risk

- Minimal

## Screenshots

### Before

### After

## Test methodology

- Manual

## Test environment(s)

- 10.0.100-preview.6.25272.112
@ricardobossan
Copy link
Member Author

Drafted because resources need to be implemented.

@dotnet-policy-service dotnet-policy-service bot added the draft draft PR label Jun 4, 2025
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.

"Use Data Bound Items" checkbox is missing in ListBox/ComboBox's SmartTag window for DemoConsole application
1 participant