Skip to content

API spec: DataTemplate from code - #11260

Open
gegao18 wants to merge 2 commits into
mainfrom
user/gegao18/DataTemplate
Open

API spec: DataTemplate from code#11260
gegao18 wants to merge 2 commits into
mainfrom
user/gegao18/DataTemplate

Conversation

@gegao18

@gegao18 gegao18 commented Jul 20, 2026

Copy link
Copy Markdown

This is an API spec for a proposed DataTemplate constructor that uses an app callback rather than markup.

API spec for #11259.

@gegao18
gegao18 requested a review from a team as a code owner July 20, 2026 19:31
@azure-pipelines

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

@gegao18 gegao18 changed the title DataTemplate from code spec API spec: DataTemplate from code spec Jul 20, 2026
@gegao18 gegao18 changed the title API spec: DataTemplate from code spec API spec: DataTemplate from code Jul 20, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the needs-triage Issue needs to be triaged by the area owners label Jul 20, 2026
* **Returning `null` is allowed.** A callback that returns `null` behaves like an empty
`<DataTemplate/>`, and no content is produced.

# Examples

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And how would an example with a DataTemplate that has x:DataType and uses x:Bind look like in code?

I assume there is no x:Bind equivalent in code, and you have to manually set up the change notifications. (PS: A Binding with a lambda parameter would be a nice addition.)

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.

2 participants