0

How can an IValueConverter return FontWeights.Bold and FontStyles.Italic?

Based on the value, my converter needs to set the textblock to Bold and Italic or just Normal.

Jerry
  • 6,357
  • 8
  • 35
  • 50

1 Answers1

1

Value Converters are intended to convert the result of a Binding operation and cannot return more than one value.

If you want to set FontWeight and FontStyle on your control, you must set a Binding on each and provide two different value converters. - one to convert to FontWeights and one to convert to FontStyles

Silver Solver
  • 2,310
  • 1
  • 13
  • 19