Add in-library support for DisplayFormat Attribute on Blazor model properties #41840
Closed
1 task done
Labels
area-blazor
Includes: Blazor, Razor Components
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
Status: Resolved
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I'd like to be able to use the MVC strategy using DisplayFormat attributes to format my model properties in Blazor apps.
Currently, the only native way to achieve this is to always apply
.ToString(_format_)
wherever the property is referenced in a Blazor page.From 2019, it sounds like this is a known missing feature: Comment in Issue 5523
Currently:
Model.cs
Page.razor
Describe the solution you'd like
I'd like references to model properties decorated with the DisplayFormat attribute tag to reflect in Blazor pages.
Ideally, this just displays with the format string applied.
Model.cs
Page.razor
Thanks!
Additional context
No response
The text was updated successfully, but these errors were encountered: