Last active
June 15, 2016 00:06
-
-
Save Driv4r/744dee99fc0a497713afadda7a8249e0 to your computer and use it in GitHub Desktop.
Example for using basic, shared resources in xaml. Put this in App.xaml.
This file contains 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="Myproject.Pages.LoginPage" Padding="25, 20, 25, 10" BackgroundColor="{StaticResource defaultBackgroundColor}" Title="Sign In"> <ContentPage.Content> <StackLayout Padding="10,0,10,20" VerticalOptions="FillAndExpand"> <StackLayout x:Name="contentLayout" VerticalOptions="CenterAndExpand"> <Image Source="PPP_Logo.png"/> <Label Text="Email" TextColor="{StaticResource defaultLabelTextColor}" /> <Entry x:Name="emailEntry" /> <Label Text="Password" TextColor="{StaticResource defaultLabelTextColor}" /> <Entry x:Name="passwordEntry" IsPassword="true"/> <Button Text="Sign In" TextColor="{StaticResource defaultButtonTextColor}" Clicked="OnLoginButtonClicked" BackgroundColor="{StaticResource greenButtonBackgroundColor}"/> <ContentView Padding="0, 20"> <Label Text="Don't have an account?" x:Name="dontHaveAccountLbl" HorizontalTextAlignment="Center" TextColor="{StaticResource defaultLabelTextColor}" FontSize="{StaticResource smallFontSize}" ></Label> </ContentView> </StackLayout> </StackLayout> </ContentPage.Content> </ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment