I have model like below
public class Person { [Display(Name = "Name of the Person", Prompt = "Enter your Name")] public string Name { get; set; } } .net MAUI content Page as below
The expected outcome is as shown in the image

The purpose is to have a common model for asp.net and .net maui with annotations and efcore decorations.Syncfusion's dataform does this by default. We cannot use syncfusion.
DisplayNameAnnotation and DisplayPromptAnnotation are written for illustration only. Binding the Name to the entry control is straight forward. I wanted to bind the corresponding annotations to placeholder or text of another label. This is straight forward in asp.net application with labelfor kind of tags. But, in .net MAUI, I could not able to figure out a way to do it. Can any one point to me in right direction.
Источник: https://stackoverflow.com/questions/781 ... ntent-page