Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Metro UI Multibinding?

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>
like image 777
Lescai Ionel Avatar asked Mar 07 '12 13:03

Lescai Ionel


2 Answers

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.

like image 73
John Bowen Avatar answered Dec 29 '22 10:12

John Bowen


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.

like image 44
Mariusz Gorzoch Avatar answered Dec 29 '22 11:12

Mariusz Gorzoch