WPF

WPF ConverterParameter

Just came to my knowledge and want share with people. 

<TextBlock Text=”{Binding Path=ABCD, Converter={StaticResource FormatConv}, ConverterParameter='{0:C}’}” />

The above code wont work i know there is nothing wrong in there but still compiler would complianed about it.

One needs to add {}  in the ConverterParameter value and that will solve the problem.

ConverterParameter='{}{0:C}’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s