title: MvvmCross - Delayed binding in TableViewCell with value converter - DataContext is not set correctly?
body: <p>I am relatively new to Mvvm and MvvmCross. I've encountered a problem in iOS;</p>
  
  <p>This is my delayed binding for my MvxTableViewCell-subclass, which I've put in <code>AwakeFromNib</code>:</p>
  
  <pre><code>this.DelayBind(() =&gt;
  {
      var bindingSet = this.CreateBindingSet&lt;MyTableViewCell, MyViewModel&gt;();
      bindingSet.Bind(myLabel).To(vm =&gt; vm.Name).WithConversion(debugvalueconverter, base.DataContext);
  });
  </code></pre>
  
  <p>My debugvalueconverter looks like this:</p>
  
  <pre><code>public class DebugValueConverter : IMvxValueConverter
          {
              public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
              {
                  System.Diagnostics.Debug.WriteLine("Converting debug: " + value);
                  if (parameter != null)
                  {
                      var vm = (MyViewModel)parameter;
                      System.Diagnostics.Debug.WriteLine("Converting debug - name from vm: " + vm.Name);
                  }
                  return value;
              }
  
              public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
              {
                  return new NotImplementedException();
              }
          }
  </code></pre>
  
  <p>This generates some odd outputs when I'm starting to recycle cells when dragging in the tableview:</p>
  
  <pre><code>Converting debug: [Name from the cell that's appearing]  
  Converting debug - name from vm: [Name from an old cell which got recycled]
  </code></pre>
  
  <p>I.e. the DataContext doesn't seem to be set correctly in this case, BUT the name-property is set correctly. Why is this happening?</p>
  
  <p>My problem is that I want to use a converter that will do some "advanced" calculations according to what's in a few properties of my ViewModel (I.e. my base.DataContext).</p>
  
  <p>Is this a bug in MvvmCross or am I missing something? Why is not the DataContext set correctly here?</p>
  
  <p>Thanks!</p>