![]() To initialize the control, import the control namespace in XAML or C code and initialize the DataForm. Notice in the validation control template, we are using a DockPanel as the layout control, therefore we can easily change where the error icon and error message will be displayed. To add the SfDataForm to your project, open the NuGet package manager in Visual Studio, search for, and then install it. That is all that is needed for the simplest validation error to show up next to the control. Now when we run the code and validation fails, a validation error will be displayed as shown in the screenshot below (coded validator class for age and phone number as well). TextBlock which will display a red exclamatory sign next to the control that has an error. Let us start with a very simple validation control template where all we have is a Here is the sample validation control template.
0 Comments
Leave a Reply. |