Grid Calculator

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

<ContentPage xmlns="http://xamarin.

com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:gridLayoutCalculator"
x:Class="gridLayoutCalculator.MainPage">
<Grid RowSpacing="1" ColumnSpacing="1">
<Grid.RowDefinitions>
<RowDefinition Height="150" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Entry Text="0" BackgroundColor="Gray" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4"
HorizontalTextAlignment="End" TextColor="white" FontSize="35" />

<Button Text="AC" BackgroundColor="Silver" TextColor="Black" Grid.Row="1" Grid.Column="0" />


<Button Text="+/-" BackgroundColor="Silver" TextColor="Black" Grid.Row="1" Grid.Column="1" />
<Button Text="%" BackgroundColor="Silver" TextColor="Black" Grid.Row="1" Grid.Column="2" />
<Button Text="/" BackgroundColor="Orange" TextColor="Black" Grid.Row="1" Grid.Column="3" />

<Button Text="7" BackgroundColor="Silver" TextColor="Black" Grid.Row="2" Grid.Column="0" />


<Button Text="8" BackgroundColor="Silver" TextColor="Black" Grid.Row="2" Grid.Column="1" />
<Button Text="9" BackgroundColor="Silver" TextColor="Black" Grid.Row="2" Grid.Column="2" />
<Button Text="x" BackgroundColor="Orange" TextColor="Black" Grid.Row="2" Grid.Column="3" />

<Button Text="4" BackgroundColor="Silver" TextColor="Black" Grid.Row="3" Grid.Column="0" />


<Button Text="5" BackgroundColor="Silver" TextColor="Black" Grid.Row="3" Grid.Column="1" />
<Button Text="6" BackgroundColor="Silver" TextColor="Black" Grid.Row="3" Grid.Column="2" />
<Button Text="-" BackgroundColor="Orange" TextColor="Black" Grid.Row="3" Grid.Column="3" />

<Button Text="1" BackgroundColor="Silver" TextColor="Black" Grid.Row="4" Grid.Column="0" />


<Button Text="2" BackgroundColor="Silver" TextColor="Black" Grid.Row="4" Grid.Column="1" />
<Button Text="3" BackgroundColor="Silver" TextColor="Black" Grid.Row="4" Grid.Column="2" />
<Button Text="+" BackgroundColor="Orange" TextColor="Black" Grid.Row="4" Grid.Column="3" />

<Button Text="0" BackgroundColor="Silver" TextColor="Black" Grid.Row="5" Grid.Column="0"


Grid.ColumnSpan="2"/>
<Button Text="." BackgroundColor="Silver" TextColor="Black" Grid.Row="5" Grid.Column="2" />
<Button Text="=" BackgroundColor="Orange" TextColor="Black" Grid.Row="5" Grid.Column="3" />
</Grid>
</ContentPage>

You might also like