Many developers don't like IValueConverters because of their verbosity.
They need to create an instance of a class, implement two-way methods, add it to the resources, and so on.
Instead, we should let them know that it's possible to use converters with x:Static and FuncValueConverter.
Simple examples:
public static class IntConverters
{
public static FuncValueConverter<int, bool> IsNotZero { get; } = new(i => i != 0);
}
I haven't checked our documentation and all samples. But in general, that's what we can recommend for one-way IValueConverter and IMultiValueConverter. Additionally, we should add FuncValueConverter two-way conversion support.
Topics to cover
Many developers don't like IValueConverters because of their verbosity. They need to create an instance of a class, implement two-way methods, add it to the resources, and so on.
Instead, we should let them know that it's possible to use converters with x:Static and FuncValueConverter. Simple examples:
That's it.
I haven't checked our documentation and all samples. But in general, that's what we can recommend for one-way IValueConverter and IMultiValueConverter. Additionally, we should add FuncValueConverter two-way conversion support.