0

I'd like to pass a user setting into a converter as the converter parameter in wpf. Can anyone tell me how to do this?

Something like the following (which doesn't work):

<TextBlock Text="{Binding MyText, Converter={StaticResource MyConverter}, ConverterParameter={x:Static properties:Settings.Default.MyParameter}" />
user2424495
  • 573
  • 1
  • 6
  • 19
  • Noted the duplicate question but I am not looking to bind the converter parameter, simply to pass in a value taken from the user settings. – user2424495 Jan 01 '15 at 20:02
  • You would have to use a binding like `{Binding MyParameter, Source={x:Static properties:Settings.Default}` to access the settings value. – Clemens Jan 01 '15 at 21:26
  • Unfortunately, you cannot use a binding on the ConverterParameter. I was hoping I could simply access it like I would a variable. – user2424495 Jan 02 '15 at 10:07
  • For those also wondering how to do this - multibinding worked for me – user2424495 Jan 05 '15 at 17:42

0 Answers0