Skip to content

Correct IsSynchronized values across ListBox collections#14679

Open
KSaiSivani wants to merge 2 commits into
dotnet:mainfrom
KSaiSivani:Fix_Issue_3088
Open

Correct IsSynchronized values across ListBox collections#14679
KSaiSivani wants to merge 2 commits into
dotnet:mainfrom
KSaiSivani:Fix_Issue_3088

Conversation

@KSaiSivani

@KSaiSivani KSaiSivani commented Jun 26, 2026

Copy link
Copy Markdown

Fixes #3088

Proposed changes

  • Override IsSynchronized in ListBox.SelectedIndexCollection and ListBox.IntegerCollection to return false.
  • Ensure consistency across all ListBox collections (SelectedObjectCollection, ObjectCollection, SelectedIndexCollection, IntegerCollection).
  • Add unit tests verifying that all four collections return IsSynchronized == false.

Customer Impact

  • Developers will no longer be misled into thinking SelectedIndexCollection and IntegerCollection are thread‑safe.
  • Clearer, consistent API behavior across all ListBox collections.
  • Prevents incorrect assumptions about synchronization and reduces risk of threading bugs.

Regression?

  • No.

Risk

  • Low. The change only affects the IsSynchronized property return value.
  • No runtime behavior or collection logic is altered.
  • Unit tests ensure correctness and prevent regressions.

Test methodology

  • Added unit tests for all four ListBox collections.
  • Verified consistent IsSynchronized == false return values.
  • Ran full test suite to confirm no regressions.

Test environment(s)

  • 11.0.100-preview.3.26170.106
Microsoft Reviewers: Open in CodeFlow

@KSaiSivani KSaiSivani requested a review from a team as a code owner June 26, 2026 13:07

@LeafShi1 LeafShi1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! @KlausLoeffelmann Please take a look on this

@LeafShi1 LeafShi1 added the waiting-review This item is waiting on review by one or more members of team label Jun 29, 2026
@ricardobossan

Copy link
Copy Markdown
Member

Also LGTM. Issue #3088 discussion already endorses this direction: JeremyKuhne said to make it match the underlying (non-synchronized) behavior; weltkante warned that forwarding IsSynchronized == true is only safe with conditional locking, so false is the safe/correct value here.

@KSaiSivani

Copy link
Copy Markdown
Author

@dotnet-policy-service agree company="Syncfusion, Inc."

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

Labels

waiting-review This item is waiting on review by one or more members of team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ListBox collections have varied IsSynchronized method implementations

3 participants