Skip to content

Tabular: stable per-column header automation RuntimeIds - #11652

Draft
Hitesh Kumar (hiteshkrmsft) wants to merge 1 commit into
mainfrom
user/hik/tableview-column-runtimeids
Draft

Tabular: stable per-column header automation RuntimeIds#11652
Hitesh Kumar (hiteshkrmsft) wants to merge 1 commit into
mainfrom
user/hik/tableview-column-runtimeids

Conversation

@hiteshkrmsft

@hiteshkrmsft Hitesh Kumar (hiteshkrmsft) commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Splits the TableView automation work out of the workaround-removal branch so it can be reviewed on its own. Draft on purpose - more automation changes are queued for this branch.

What this does

TableViewColumnHeaderAutomationPeer instances were created on demand, so a column's UIA RuntimeId changed across enumeration, reorder and virtualization. This caches the peer on TableViewColumn and returns the same instance for the lifetime of the ownership.

The cache is cleared when the column is detached from its TableView. The single-owner invariant in SetOwningTableViewInternal rejects a re-own that has not first passed through the detach path, so a cached peer can never outlive its owner.

Also drops the comments that documented the old colliding-RuntimeId behaviour.

Why it is separate

Zero coupling with the workaround-removal work - 29 lines, all under controls/dev/TableView/, no IDL, no build, no packaging, no resource changes. Different reviewers and a different test story, so it should not gate that branch.

Not done yet

  • RuntimeId-stability assertion (enumerate -> reorder -> re-enumerate, assert identity holds)
  • Further per-column automation changes

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the needs-triage Issue needs to be triaged by the area owners label Aug 26, 2026
…ay stable

TableViewColumnHeaderAutomationPeer instances were created on demand, so a column's
UIA RuntimeId changed across enumeration, reorder and virtualization. Cache the peer
on TableViewColumn and hand the same instance back for the lifetime of the ownership.

The cache is cleared when the column is detached from its TableView; the single-owner
invariant in SetOwningTableViewInternal guarantees a re-own always passes through that
detach, so a cached peer can never outlive its owner.

Also drops the stale comments that documented the colliding-RuntimeId behaviour.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-triage Issue needs to be triaged by the area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant