Skip to content

Fix BindableObject.GetLocalValueEnumerator() removed by #33584 breaks VS Live Property Explorer - #36063

Merged
jfversluis merged 2 commits into
dotnet:mainfrom
devanathan-vaithiyanathan:fix-vs-Live-property-explorer
Jun 24, 2026
Merged

Fix BindableObject.GetLocalValueEnumerator() removed by #33584 breaks VS Live Property Explorer#36063
jfversluis merged 2 commits into
dotnet:mainfrom
devanathan-vaithiyanathan:fix-vs-Live-property-explorer

Conversation

@devanathan-vaithiyanathan

Copy link
Copy Markdown
Contributor

Issue details:

After PR #33584 (BindableObject property access micro-optimizations), Visual Studio's Live Property Explorer stops showing any property values for MAUI controls. The feature becomes completely blank.

Description of changes:

PR #33584 removed GetLocalValueEnumerator(), LocalValueEnumerator, and LocalValueEntry from BindableObject as "unused dead code" — a grep of the MAUI codebase confirmed zero internal callers. However, Visual Studio's Live Property Explorer calls GetLocalValueEnumerator() via reflection at runtime to enumerate locally-set bindable property values on live objects. With these types removed, the reflection call fails silently and the panel shows nothing.

This changes restores all three types, adapted to the new Dictionary<int, BindablePropertyContext> storage introduced by #33584 — the enumerator now iterates .Values (the BindablePropertyContext objects directly) and reads context.Property to expose the BindableProperty, since the dictionary key is now an int rather than the property itself.

Tested the behavior in the following platforms.

  • Android
  • Windows
  • iOS
  • Mac
Before After
Windows
Before.mp4
Windows
After.mp4

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36063

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36063"

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 22, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review June 22, 2026 15:02
@github-actions github-actions Bot added the area-controls-general General issues that span multiple controls, or common base classes such as View or Element label Jun 22, 2026
@sheiksyedm sheiksyedm added p/0 Current heighest priority issues that we are targeting for a release. area-core labels Jun 24, 2026
@sheiksyedm sheiksyedm added this to the .NET 10 SR9 milestone Jun 24, 2026
@sheiksyedm

Copy link
Copy Markdown
Contributor

@kubaflo This PR addresses the regression caused by PR #33584, which has already been included in the main branch. The fix is straightforward, as it restores code that was previously removed from PR #33584 because it appeared to be unused, but is actually accessed through reflection.

Therefore, this PR can be merged directly into the main branch instead of going through the inflight branch.

kubaflo
kubaflo previously approved these changes Jun 24, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jfversluis
jfversluis merged commit 19abc43 into dotnet:main Jun 24, 2026
3 of 12 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-general General issues that span multiple controls, or common base classes such as View or Element area-core p/0 Current heighest priority issues that we are targeting for a release. partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants