I've been playing around with WPF for quite a while now, but for the first time today, I needed to nest a MultiBinding
inside another, something like:
<MultiBinding>
<Binding />
<MultiBinding>
<Binding />
<Binding />
</MultiBinding>
</MultiBinding>
I get an exception indicating it's not allowed by the framework:
XamlParseException was unhandled: Add value to collection of type 'System.Collections.ObjectModel.Collection(System.Windows.Data.BindingBase)' threw an exception.
The InnerException
is more explicit:
BindingCollection does not support items of type MultiBinding. Only Binding is allowed.
So digging the web for more info, I stumbled upon this Microsoft Connect issue which is exactly my problem.
Thank you for the feedback. WPF doesn't support this today. This feature has been requested for years (most recently earlier this month - see https://connect.microsoft.com/WPF/feedback/details/650164/nested-multibinding). We'll continue to consider this for future releases.
Right now I've made my peace that I won't have it easy. Still I need this, how can I nest MultiBindings?
IMultiValueConverter
(s). – Rameau