by StefanOlson via Stefan Olson's Blog on 4/28/2010 10:36:55 AM
Update 29/June/2010: Colin Eberhardt who originally developed this technique has posted an update, including these changes: http://www.scottlogic.co.uk/blog/colin/2010/05/silverlight-multibinding-solution-for-silverlight-4/
The Silverlight multi-binding functionality that I have described previously (see here) doesn't work in Silverlight 4, due to the changes in the xaml parser. This code:
<local:MultiBinding TargetProperty="Text" Converter="{StaticResource TitleConverter}"> <Binding Path="Surname"/> <Binding Path="Forename"/> </local:MultiBinding>
Gives this exception:
System.Windows.Markup.XamlParseException: Set property 'SLMultiBinding.MultiBinding.Bindings' threw an exception
the solution is to wrap the bindings in a binding collection, e.g:
<local:MultiBinding TargetProperty="Text" Converter="{StaticResource TitleConverter}"> <local:BindingCollection> <Binding Path="Surname"/> <Binding Path="Forename"/> </local:BindingCollection> </local:MultiBinding>
You also need to download the latest version of the MultiBinding.cs file, from here
Original Post: Updates to Silverlight Multi-binding support
The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.