Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Image.Source with OnPlatform in Xaml

$
0
0

I have been having a Dickens of a time setting the source property on the image in conjunction with Xaml. I'm trying to use the guide here developer.xamarin.com/guides/cross-platform/xamarin-forms/Xaml-for-Xamarin-forms/essential_xaml_syntax/ but it blows up every time.

        <Image>
            <Image.Source>
                <OnPlatform x:TypeArguments="ImageSource">
                    <OnPlatform.iOS>icon_twitter.png</OnPlatform.iOS>
                    <OnPlatform.Android>icon_twitter.png</OnPlatform.Android>
                    <OnPlatform.WinPhone>Images/icon_twitter.png</OnPlatform.WinPhone>
                </OnPlatform>
            </Image.Source>
        </Image>

Works fine setting it through code. Any ideas?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>