title: ValueConverter with multiple arguments
body: <p>I'm trying to write a control that has three related properties: value, minimum and maximum. Value changes, but minimum and maximum are fixed.</p>
  
  <p>So I wrote a IMultiValueConverter:</p>
  
  <pre><code>public class AngleMultiConverter : IMultiValueConverter
  {
      public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          double value = (double)values[0];
          double minimum = (double)values[1];
          double maximum = (double)values[2];
  
          double angle = -150.0 + ((value - minimum) * 300.0 / (maximum - minimum));
          return angle;
      }
  
      public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>The XAML looks like the following (it's a custom control, hence the RelativeSource stuff):</p>
  
  <pre><code>&lt;RotateTransform.Angle&gt;
      &lt;MultiBinding Converter="{StaticResource angleMultiConverter}"&gt;
          &lt;Binding Path="Value" RelativeSource="{RelativeSource AncestorType={x:Type local:KnobControl}}"/&gt;
          &lt;Binding Path="MinimumValue" RelativeSource="{RelativeSource AncestorType={x:Type local:KnobControl}}" Mode="OneWay"/&gt;
          &lt;Binding Path="MaximumValue" RelativeSource="{RelativeSource AncestorType={x:Type local:KnobControl}}" Mode="OneWay"/&gt;
      &lt;/MultiBinding&gt;
  &lt;/RotateTransform.Angle&gt;
  </code></pre>
  
  <p>That works fine, but what about ConvertBack? I have to pass back three values... but I only have one? The other two are constants, so how do I know what they are?</p>
  
  <p>My other solution that works is to create a dependancy property called Angle which does all the work in a custom control... but exposes Angle which seems wrong.</p>