XAML Multi-binding for Windows Phone and Universal apps


Allow you to make multi-bindings on Windows Phone and Windows 8 applications (Silverlight as well as WinRT apps) similar to WPF multi-bindings.

<TextBlock FontSize="20" TextWrapping="Wrap" Foreground="Cyan">
  <mb:MultiBindingLinker.Attach>
    <mb:MultiBindings>
       <mb:MultiBinding TargetProperty="Text" Converter="{StaticResource ConcatMultiConverter}">
          <mb:Binding Path="StringValue" />
          <mb:Binding Path="Text" ElementName="ConcatTextBox1"/>
          <mb:Binding Path="Text" ElementName="ConcatTextBox2" Converter="{StaticResource ToUpperCaseConverter}"/>
          <mb:Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}" />
     </mb:MultiBinding>
   </mb:MultiBindings>
  </mb:MultiBindingLinker.Attach>
</TextBlock>



Current support :
  • simple binding (using explicit or implicit DataContext)
  • binding to another element in your page (ElementName)
  • bindings relative to the current control (RelativeSource=Self)
  • converters
  • converter parameters
  • converter culture

Last edited Dec 29, 2014 at 8:31 PM by rudyhuyn, version 4