How do I display an image in a Xamarin Forms ImageCell from an image source?
<p>I'm trying to display an image at the front of my image cell in Xamarin Form. Specifically I'm trying this in iOS at the moment and I have added an image to my iOS project's resource folder and have ensured that the image file is set to 'BundledResource. The image is not any particular size (it's quite large at the moment).</p>

<p>I'm creating all of my table cells via an MVVM approach so I have a factory that creates the cell as follows:</p>

<pre><code>return new ImageCell() { ImageSource = "logo.png" };
</code></pre>

<p>I have hardcoded the image source or now as a local png image which is NOT 60x60 (does this matter?).</p>

<p>When displayed, no placeholder for the image, or the image itself appears. Do I need to set an additional flag somewhere to display it? There is no margin to display it in my table view.</p>

<p>EDIT: My image cell factory code looks like this:</p>

<pre><code>public class ImageCellFactory : CellFactory&lt;ImageCellViewModel&gt;
{
    protected override Cell OnCreateCell(ImageCellViewModel model)
    {
        return new ImageCell();
    }

    protected override void OnSetBindings(Cell cell)
    {

        cell.SetBinding(TextCell.TextProperty, "Text");
        cell.SetBinding(TextCell.DetailProperty, "Detail");
        cell.SetBinding(ImageCell.ImageSourceProperty, new Binding("Icon", BindingMode.OneWay));
    }
}
</code></pre>

<p>I've tried directly setting the image source as per my previous code (thus removing the bindings and so on). I've tried with and without binding mode being set. I can see that the ImageSource is creating an instance of the FileImageSource and I've even set the icon to be 30x30 just in case that helps.</p>

<p>For the 'Icon' property of the view model I have tried ImageSource and just a straight string to invoke the standard converter.</p>

<p>Even with a direct TableView definition set up in Xaml with no funny business in the code-behind my images do not appear.</p>

<pre><code>&lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="TesterApp.CodedTableView"&gt;
&lt;ContentPage.Content&gt;
    &lt;TableView&gt;
        &lt;TableSection&gt;  
            &lt;ImageCell Text="My Logo" ImageSource="logo.jpg"/&gt;  
        &lt;/TableSection&gt;
    &lt;/TableView&gt;
&lt;/ContentPage.Content&gt;
</code></pre>

<p></p>

<p>My logo is in the 'Resources' folder of my iOS application project And is set to a bundled resource. The above image source is the exact casing for the filename and extension.</p>