🔄Converters
Converters are used to convert one type to another type, sometimes with additional parameters. For example, a value can be converted to a string using a given format. The BindingSystem provides examples of implementing converters in the code, making it easy to understand and extend this functionality.
To add a new converter it is sufficient to implement IConverter<TFrom, TTo>
interface:
The system will automatically pick up the new converter and add it to converters list. To avoid auto registration of the new converter, add [HideMember]
attribute over the class.
Sometimes the system will need another recompilation round to successfully register the new converter.
The converter must have a parameterless constructor.
When having multiple converters, the system will give the user the possiblity to select which converter to use:
Last updated