How do you apply ValueConverter to Caliburn.Micro binding based on convention?

How do you apply ValueConverter to Caliburn.Micro binding based on convention? or do you need to use the {Binding} syntax?

I know I can do it

<TextBlock Text="{Binding Foo, Converter=fooToBarConverter}" /> 

but how to apply this custom converter if I use the Caliburn.Micro configuration convention, for example

 <TextBlock x:Name="Foo" /> 

Thanks,

+8
silverlight binding xaml valueconverter caliburn.micro
source share
1 answer

You need to replace the ConventionManager.ApplyValueConverter function. By default, it only does athe bool => Convert visibility. Alternatively, you can replace the ApplyStringFormat function for normal string formatting. Take a look at the ConventionManager to find out how it works.

+5
source share

All Articles