Created
May 28, 2016 04:45
-
-
Save pragmaticlogic/7d444bc4bf694e045b498d625741a7af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ContentPage | |
xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
x:Class="ButtonWithImage.MainPage" | |
Title="Button Image Sample" | |
BackgroundColor="White"> | |
<ContentPage.Resources> | |
<ResourceDictionary> | |
<OnPlatform x:Key="RefreshImage" x:TypeArguments="ImageSource"> | |
<OnPlatform.iOS>refresh.png</OnPlatform.iOS> | |
<OnPlatform.Android>refresh_black_24dp.png</OnPlatform.Android> | |
<OnPlatform.WinPhone>refresh_black_24dp.png</OnPlatform.WinPhone> | |
</OnPlatform> | |
</ResourceDictionary> | |
</ContentPage.Resources> | |
<StackLayout> | |
<!-- ... --> | |
<StackLayout VerticalOptions="End"> | |
<StackLayout IsVisible="{Binding NoConnection}" x:Name="ButtonStackLayout" Orientation="Horizontal" Spacing="10" Padding="10,10,10,10" BackgroundColor="#E3E3E3"> | |
<StackLayout HorizontalOptions="StartAndExpand"></StackLayout> | |
<Label x:Name="ButtonLabel" BackgroundColor="#E3E3E3" Text="Retry" TextColor="Black" VerticalOptions="Center" HorizontalOptions="Center" /> | |
<Image x:Name="ButtonImage" BackgroundColor="#E3E3E3" WidthRequest="24" Source="{StaticResource RefreshImage}" VerticalOptions="Center" HorizontalOptions="Center" /> | |
<StackLayout HorizontalOptions="EndAndExpand"></StackLayout> | |
</StackLayout> | |
</StackLayout> | |
</StackLayout> | |
</ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment