Skip to content

Instantly share code, notes, and snippets.

@hjerpbakk
Created November 2, 2014 20:00
Show Gist options
  • Save hjerpbakk/35d2c9c26183cb3059b8 to your computer and use it in GitHub Desktop.
Save hjerpbakk/35d2c9c26183cb3059b8 to your computer and use it in GitHub Desktop.
An example Xamarin Forms layout
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
x:Class="PersonalTrainer.Views.DayDetailsPage"
Title="{Binding Day}" >
<TableView VerticalOptions="FillAndExpand" Intent="Form">
<TableView.Root>
<TableRoot>
<TableSection Title="Time spent">
<ViewCell Tapped="HandleTapped">
<StackLayout Orientation="Horizontal" Padding="{x:Static l:App.CellPadding}">
<Label Text="Time working" HorizontalOptions="StartAndExpand" VerticalOptions="Center" />
<TimePicker x:Name="timeWorked" Time="{Binding TimeWorked}" IsVisible="false" />
<Label Text="{Binding TimeWorkedText}" TextColor="{x:Static l:App.ValueColorString}" HorizontalOptions="End" VerticalOptions="Center" />
</StackLayout>
</ViewCell>
</TableSection>
</TableRoot>
</TableView.Root>
</TableView>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment