title: How to bind imageSource to ImageView in MvvmCross
body: <p>I'm having trouble to bind a source with converter to an imageview in my Touch project. I found <a href="https://stackoverflow.com/questions/12925056/binding-to-path-imageview-in-mvvmcross-for-monodroid-android">here</a> and <a href="https://stackoverflow.com/questions/12876406/how-to-bind-an-image-src-to-resource-drawable-image-with-mvvmcross">here</a> how to make it in Android</p>
  <pre><code>public class TypeToSourceConverter : MvxValueConverter&lt;int, string&gt;
  {
      protected override string Convert (int value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          var assetName = ((AppConstants.Type)value).ToString ().ToLower ();
          return &quot;Images/&quot; + assetName + &quot;.png&quot;;
      }
  }
  </code></pre>
  <p>But I'm having trouble in how to use this converter in iOS, i just found samples with ImageURL, I'm starting in iOS now, so I have some stupid questions as how I bind the image with this converter and where should I put the image in the Touch project! Is it in Resource/Images/*.png ?</p>
  <p>Thanks in Regards,
  Gabriel</p>
  <hr />
  <h2>EDIT</h2>
  <p>Well, what I did, to try to solve it is:
  I'm passing as parameter in Droid and in iOS, a number, so in converter I do:</p>
  <pre><code>protected override string Convert (int value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
      {
          var assetName = ((AppConstants.Type)value).ToString ().ToLower ();
          switch(int)
                      {
                      case 0://Droid
                          return &quot;Images/&quot; + assetName + &quot;.png&quot;;
                      case 1://Touch
                          return &quot;res:Images/&quot; + assetName + &quot;.png&quot;;
                      default:
                          return &quot;&quot;;
      }
  </code></pre>
  <p>And in my touch Table View Cell, i have:</p>
  <pre><code>        var imageViewLoader = new MvxImageViewLoader (() =&gt; historicTypeImageView);
          Opaque = true;
          this.DelayBind(() =&gt; {
              var set = this.CreateBindingSet&lt;HistoricCell, Historic&gt;();
              set.Bind(imageViewLoader).For(i =&gt; i.DefaultImagePath).To(historic =&gt; historic.UpdateType).WithConversion(&quot;HistoricTypeToSource&quot;, 2);
              set.Apply();
          }
          
  </code></pre>
  <p>Now, the problem is: I figured out it was working only for the first cells, not all of them, like, it was replicating the first imageViews that was appearing for all cells, instead of bind each cell's image for each Type ...</p>
  <p>I saw in the output, that i'm receiving:</p>
  <pre><code>2014-04-18 14:40:45.902 MyProjectTouch[23081:70b] MvxBind:Warning: 30.59 Weak Target is null in MvxWithEventPropertyInfoTargetBinding - skipping set
  </code></pre>
  <p>So probably, it is because of this weak target that it is skipping the bind of others cell... I'm looking for answers but didn't find yet. Actually found this <a href="https://stackoverflow.com/questions/18647115/mvvmcross-flood-of-messages-weak-target-is-null-in-skipping-set">this</a> but not sure it works to fix my problem..</p>
  <p>Can anyone help me, please!</p>