Open wang-er-s opened 5 years ago
ugui-mvvm is largely modeled after XAML bindings. Back in WPF XAML, we had something to achieve this called a MultiBinding
, which aggregated multiple regular Bindings, and then specified an IMultiValueConverter
. If ugui-mvvm had something like this, then in your example above, the second parameter would map to the multiple aggregated bindings, and the third parameter would map to the multi-converter.
I think this could be a good approach for ugui-mvvm, but would definitely require some work. I think something like this would make sense:
PropertyBinding
class.MultiPropertyBinding
class that has a collection of the factored out stuff from PropertyBinding
. Imagine in the inspector having a collection of elements that look similar to what we see in PropertyBinding
today, where each element has a binding source, a binding target, and optionally a converter. Additionally, it would have a target property just like PropertyBinding
.IMultiValueConverter
interface, and have it be a required property on the MultiPropertyBinding
. This is the thing that would combine multiple property values into a single output value.
in c#,I didn't expect any good solution. do you have any good idea? pls tell me ! thanks