Xamarin.Forms: Use image from asset catalog
<p>I have a <a href="https://developer.xamarin.com/guides/xamarin-forms/user-interface/navigation/master-detail-page/" rel="noreferrer">Master Detail page</a> and I want to set the icon in the navigation bar to show the menu. Therefore I put my images into an asset catalog (Asset Catalogs > Media > menu). If I want to reference that image from XAML it doesn't show up, when the image is in the asset catalog.</p>

<p>I tried different paths, but they all don't work. <a href="https://developer.xamarin.com/guides/xamarin-forms/working-with/images/#Debugging_Code" rel="noreferrer">Debugging</a> also doesn't show any images. It seems that Xamarin.Forms doesn't support asset catalogs, but that is not true. On a normal content page I have this:</p>

<pre><code>&lt;ContentPage.ToolbarItems&gt;
 &lt;ToolbarItem Text="Configuration" Activated="OpenConfiguration" Order="Primary" Priority="0"&gt;
  &lt;ToolbarItem.Icon&gt;
    &lt;OnPlatform x:TypeArguments="FileImageSource"&gt;
      &lt;OnPlatform.iOS&gt;gear.png&lt;/OnPlatform.iOS&gt;
      &lt;OnPlatform.Android&gt;gear.xml&lt;/OnPlatform.Android&gt;
      &lt;OnPlatform.WinPhone&gt;Assets/gear.png&lt;/OnPlatform.WinPhone&gt;
    &lt;/OnPlatform&gt;
  &lt;/ToolbarItem.Icon&gt;
 &lt;/ToolbarItem&gt;
&lt;/ContentPage.ToolbarItems&gt;
</code></pre>

<p>This is working without problems. On my <code>MasterPage</code> (page, which is responsible for showing the menu entries in the master detail template) I have this:</p>

<pre><code>&lt;ContentPage.Icon&gt;
 &lt;OnPlatform x:TypeArguments="FileImageSource"&gt;
  &lt;OnPlatform.iOS&gt;menu.png&lt;/OnPlatform.iOS&gt;
  &lt;OnPlatform.Android&gt;menu.xml&lt;/OnPlatform.Android&gt;
  &lt;OnPlatform.WinPhone&gt;Assets/menu.png&lt;/OnPlatform.WinPhone&gt;
 &lt;/OnPlatform&gt;
&lt;/ContentPage.Icon&gt;
</code></pre>

<p>Bascially, it is the same code, but the icon doesn't show up. I get the icon only displaying if I put the images into <code>Resources</code> folder ...</p>

<p>But how can I use the images from the asset catalog in my XAML?</p>