Skip to content

Undocumented {PARAMETER NAME}Expression feature in blazor data binding documentation. #30656

@AntMaster7

Description

@AntMaster7

Type of issue

Missing information

Description

I came across a hidden feature with data binding that I could not find anywhere in the documentation. If you have a public parameter of type string for example you can add a {PARAMETER NAME}Expression property and this property will be filled with the actual expression of the bound property. I think this detail is missing from the documentation and comes in handy for people who author their own input controls.

[Parameter] public string? Text { get; set; }

[Parameter] public EventCallback<string?> TextChanged { get; set; }

[Parameter] public Expression<Func<string?>>? TextExpression { get; set; } // undocumented feature

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/components/data-binding?view=aspnetcore-7.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/components/data-binding.md

Version Independent Document ID

3f912dfc-5ba5-6c6c-ba93-1ae78508a5cc

Article author

guardrex

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions