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

Setting ContentPage Icon

$
0
0

I wanted to display an icon for an App on the next to the Title - ideally on the LHS.

I attempted to modify petzold's toolbar demo as follows, but... no cigar. No icon is displayed on the Title/toolbar line.

    <?xml version="1.0" encoding="utf-8"?>
    <Content    Page xmlns="http://xamarin.com/schemas/2014/forms"
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                x:Class="ToolbarDemo.ToolbarDemoPage"
                Title="Toolbar Demo">
        <ContentPage.Icon>
                    <OnPlatform x:TypeArguments="FileImageSource"
                                iOS="edit.png"
                                Android="ic_action_edit.png"
                                WinPhone="Images/edit.png" />
            </ContentPage.Icon>           

....
....
....

The icon resource referenced is available because it is used in the toolbar itself later on in the XAML.

Can anyone point out what I am missing?

Thanks.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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