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

Labs ImageButton Source Android great, WP does not work

$
0
0

I have the following code succesfully working on Android:

<controls:ImageButton BorderRadius="0" Grid.Column="0" Text="Sales" BackgroundColor="{x:Static local:Colors.Blue}" 
        TextColor="White" HeightRequest="110" WidthRequest="110" HorizontalOptions="FillAndExpand" VerticalOptions="Center"
        ImageHeightRequest="64" Font="16" ImageWidthRequest="64" Orientation="ImageOnTop"  >
         <controls:ImageButton.Source>
                    <OnPlatform x:TypeArguments="ImageSource">
                        <OnPlatform.iOS>
                            <FileImageSource File="sales.png" />
                        </OnPlatform.iOS>
                        <OnPlatform.Android>
                            <FileImageSource File="sales.png" />
                        </OnPlatform.Android>
                        <OnPlatform.WinPhone>
                            <FileImageSource File="Assets/Icons/sales.png" />
                        </OnPlatform.WinPhone>
                    </OnPlatform>
                </controls:ImageButton.Source>
 </controls:ImageButton>

The issue is that the path is right in WP because I added an Image with the same uri and works but inside the button does not. Is this a bug? Does any have tested it?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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