Compound ValueConverter in C++ ?
Posted: 12 May 2021, 10:45
I'm trying to use a compound value converter, defined like this:
For which the c# is this (from https://riptutorial.com/wpf/example/161 ... converter-):
Though I'm not sure how to implement the ValueConverter in C++ to allow the child ValueConverters to be added. So far I've just implemented it as a standard ValueConverter. I think Noesis is expecting a method to add a child node, because I get this error in the output window:
Can anyone help?
Thanks.
Code: Select all
<u:ValueConverterGroup x:Key="MyGroup1">
<u:SomeValueConverter1/>
<u:SomeValueConverter2/>
</u:ValueConverterGroup>
Code: Select all
public class ValueConverterGroup : List<IValueConverter>, IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return this.Aggregate(value, (current, converter) => converter.Convert(current, targetType, parameter, culture));
}
etc..
I need to add the equivalent of this I guess: List<IValueConverter>"Can't assign child to parent"
Can anyone help?
Thanks.