locked
ConverterParameter binding RRS feed

  • Question

  • In a binding using a Converter I need to pass in a parameter to the Converter that is itself a binding, specifically the width of the control's container. The control - and its container - are part of a template so I don't think I can do this by name, anyone suggest how? Code is something like this:

     

    <Border Width="{Binding Appointment.SetupTime, Converter={StaticResource BarFormatter}, ConverterParameter={Binding need.actualwidth.of.container.grid.here}}" />
    Tuesday, October 25, 2011 8:48 AM

Answers

  • I was looking for the same thing a while back and got hung up until I realized that ConverterParameter cannot except a binding - only a literal value.  You'll have to find another solution.

    Tuesday, October 25, 2011 9:13 AM