Created
May 28, 2016 07:38
-
-
Save pragmaticlogic/3643a97e1081a2cab17249f7db16302d 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="StartAndExpand"></StackLayout> | |
<StackLayout VerticalOptions="Center" HorizontalOptions="Center"> | |
<ActivityIndicator IsRunning="{Binding IsLoading}" IsVisible="{Binding IsLoading}" Color="Black" VerticalOptions="Center" HorizontalOptions="Center" /> | |
</StackLayout> | |
<StackLayout VerticalOptions="Center" HorizontalOptions="Center"> | |
<Image IsVisible="{Binding NoConnection}" WidthRequest="100" HeightRequest="100" Source="NoConnection.png" VerticalOptions="Center" HorizontalOptions="Center" /> | |
</StackLayout> | |
<StackLayout VerticalOptions="CenterAndExpand"></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