title: How do you pass data into an IValueConverter in XAML?
body: <p>I have an IValueConverter whose job it is to convert a BlockId to a ConditionLabel. The problem is that my Model object is what has the smarts to do the actual conversion. My code looks like this so far...</p>
  
  <pre><code>public class BlockIdToConditionLabelConverter : IValueConverter
  {
      private Model _model;
  
      public BlockIdToConditionLabelConverter(Model model)
      {
          _model = model;
      }
  
      public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
      {
          int blockId = (int)value;
          return _model.BlockIdToConditionLabel(blockId);
      }
  
      public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
      {
          return Binding.DoNothing;
      }
  }
  </code></pre>
  
  <p>At the moment, I create a static resource in a ResourceDictionary like this (and later refer to it in a DataTemplate):</p>
  
  <pre><code>&lt;local:BlockIdToConditionLabelConverter
      x:Key="_blockIdToConditionLabelConverter" /&gt;
  </code></pre>
  
  <p>The problem is, I need a way to pass my Model object into this converter. How would I do that?</p>
  
  <p>Thanks.</p>