Skip to content

Instantly share code, notes, and snippets.

@khle
Last active November 3, 2020 12:56
Show Gist options
  • Save khle/97f4164f8119afda512340191fb0de55 to your computer and use it in GitHub Desktop.
Save khle/97f4164f8119afda512340191fb0de55 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:components="clr-namespace:AsyncButtonApp.Components"
xmlns:vm="clr-namespace:AsyncButtonApp.ViewModels"
x:Class="AsyncButtonApp.Views.MainPage"
Title="Main Page">
<ContentPage.BindingContext>
<vm:MainPageViewModel />
</ContentPage.BindingContext>
<ContentPage.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/AsyncButtonControlTemplateResourceDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<StackLayout BackgroundColor="White">
<components:AsyncButtonView ControlTemplate="{StaticResource AsyncButtonControlTemplate}"
HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" Padding="0"
ButtonCornerRadius="8"
ButtonHasShadow="True" ButtonClippedToBounds="True"
ButtonBackgroundColor="#3F51B5"
ButtonTextColor="White"
ButtonText="Fetch Data"
IsFetching="{Binding IsFetching}" FetchCommand="{Binding FetchCommand}" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment