WPF-Forge/Forge.Forms

DynamicForm not showing validation messages

skadefro opened this issue · 2 comments

I got inspired by your example application and embedded a side by side showing XML and the form, using DynamicForm, but it doesn't not show the message from validate when validation fails.
Did I missing something obviuse or is that just not supported in DynamicForm ?
image

Hi @skadefro.

You aren't doing anything wrong. Looks like you are using the default WPF template. It's a little neglected and the UX may not be ideal. The default WPF textbox error template has no error messages by default. Here is an article that touches upon error templates.

You can customize the theme for desired controls by providing custom templates or using a theme pack like material or metro (metro is also a little behind). You can see default themes here for reference. The demo uses material theme.

For anything custom you can create ControlTemplates for various controls. For example for single-line textbox you must provide a ControlTemplate for type StringPresenter. Here you can find default ones for WPF, Material, and Metro on which you can base your implementation. This can be done externally without modifying any code of this library, just like you can create custom templates for buttons etc in WPF.

Please let me know if anything is unclear.

Thank you very much for a good explanation. I will start by using a theme and then later see if creating custom controltemplates is better for my use.