Metro UI Multibinding?
Asked Answered
R

3

5

Is multibinding not supported in Metro UI? Or has it just not been added yet ?

<TextBlock>
  <TextBlock.Text>
    <MultiBinding StringFormat="{}{0},{1}">
      <Binding Path="FirstName" />
      <Binding Path="LastName" />
    </MultiBinding>                
  </TextBlock.Text>                
</TextBlock>
Royston answered 7/3, 2012 at 13:48 Comment(0)
G
8

Unfortunately, MultiBinding doesn't exist in Metro XAML yet in the Beta and given that few new features are added after Beta, it most likely won't show up until the next version. The StringFormat you're using here is also not available yet on Binding.

In general, the maturity of the Metro XAML feature set is currently similar to Silverlight from a few versions ago, so compared to SL 5 it's missing some things and compared to WPF it's missing a lot, but on the plus side this stuff should get added in fairly quickly in future versions.

Gourmand answered 7/3, 2012 at 14:7 Comment(2)
If we have to wait until each new release of Windows before getting the next batch of changes, and the release cycle is around 3 years for the Windows OS, that is quite a long time. Silverlight had the advantage of updating pretty regular.Spelunker
I agree, but I doubt that's going to be the case. The Metro platform has a lot of growing to do that's not based on updating the underlying OS and it would make much more sense to do frequent app platform updates.Gourmand
C
2

I found a way of passing more then one parameter to OnExecute through using Converter/ConverterParameters.
Here you can find more details:
http://mariuszgorzoch.wordpress.com/2014/07/21/metro-ui-multibinding/

In general I'm taking original CommandParameter and marge them with ConverterParameters in one array. The only limitation of that approach is that you can pass only one paramter by-ref and all other ones need to be in form of string.

Cockerel answered 21/7, 2014 at 10:0 Comment(0)
C
0

You can download NuGet package for WindowsStore projects. It supports most of WPF's MultiBinding features. You can find documentation on how to use it here.

Caryophyllaceous answered 20/1, 2016 at 14:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.