|
5 | 5 | x:Class="TipCalc.TipCalcPage"> |
6 | 6 | <ContentPage.Resources> |
7 | 7 | <ResourceDictionary> |
8 | | - <local:TipCalcModel x:Key="model" TipPercent="15" /> |
9 | | - <local:DoubleToStringConverter x:Key="stringConverter" /> |
10 | | - <local:DoubleRoundingConverter x:Key="roundConverter" /> |
| 8 | + <local:TipCalcModel x:Key="Model" TipPercent="15" /> |
| 9 | + <local:DoubleToStringConverter x:Key="StringConverter" /> |
| 10 | + <local:DoubleRoundingConverter x:Key="RoundConverter" /> |
11 | 11 | </ResourceDictionary> |
12 | 12 | </ContentPage.Resources> |
13 | 13 |
|
14 | | - <Grid BindingContext="{StaticResource model}" x:DataType="local:TipCalcModel" RowSpacing="8" ColumnSpacing="8" Padding="20"> |
| 14 | + <Grid BindingContext="{StaticResource Model}" x:DataType="local:TipCalcModel" RowSpacing="8" ColumnSpacing="8" Padding="20"> |
15 | 15 | <Grid.Margin> |
16 | 16 | <OnPlatform x:TypeArguments="Thickness"> |
17 | 17 | <On Platform="iOS" Value="5,20,5,0" /> |
|
33 | 33 | </Grid.ColumnDefinitions> |
34 | 34 | <!-- Row 0 --> |
35 | 35 | <Label Text="Food & Drink:" Grid.Row="0" Grid.Column="0" FontSize="Large" HorizontalTextAlignment="End" VerticalTextAlignment="Center" /> |
36 | | - <Entry Grid.Row="0" Grid.Column="1" Keyboard="Numeric" Placeholder="Subtotal" Text="{Binding SubTotal, Converter={StaticResource stringConverter}}" /> |
| 36 | + <Entry Grid.Row="0" Grid.Column="1" Keyboard="Numeric" Placeholder="Subtotal" Text="{Binding SubTotal, Converter={StaticResource StringConverter}}" /> |
37 | 37 | <!-- Row 1 --> |
38 | 38 | <Label Text="Total after Tax:" Grid.Row="1" Grid.Column="0" FontSize="Large" HorizontalTextAlignment="End" VerticalTextAlignment="Center" /> |
39 | | - <Entry Grid.Row="1" Grid.Column="1" Keyboard="Numeric" Placeholder="Receipt total" Text="{Binding PostTaxTotal, Converter={StaticResource stringConverter}}" /> |
| 39 | + <Entry Grid.Row="1" Grid.Column="1" Keyboard="Numeric" Placeholder="Receipt total" Text="{Binding PostTaxTotal, Converter={StaticResource StringConverter}}" /> |
40 | 40 | <!-- Row 2 --> |
41 | 41 | <Label Text="Tip Percent:" Grid.Row="2" Grid.Column="0" FontSize="Large" HorizontalTextAlignment="End" VerticalTextAlignment="Center" /> |
42 | | - <Entry Grid.Row="2" Grid.Column="1" Keyboard="Numeric" Text="{Binding TipPercent, Converter={StaticResource stringConverter}}" /> |
| 42 | + <Entry Grid.Row="2" Grid.Column="1" Keyboard="Numeric" Text="{Binding TipPercent, Converter={StaticResource StringConverter}}" /> |
43 | 43 | <!-- Row 3 --> |
44 | | - <Slider Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Minimum="0" Maximum="100" Value="{Binding TipPercent, Mode=TwoWay, Converter={StaticResource roundConverter}, ConverterParameter=0.5}" /> |
| 44 | + <Slider Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Minimum="0" Maximum="100" Value="{Binding TipPercent, Mode=TwoWay, Converter={StaticResource RoundConverter}, ConverterParameter=0.5}" /> |
45 | 45 | <!-- Row 4 --> |
46 | 46 | <Label Text="Tip Amount:" Grid.Row="4" Grid.Column="0" FontSize="Large" HorizontalTextAlignment="End" VerticalTextAlignment="Center" /> |
47 | 47 | <ContentView BackgroundColor="#40808080" Grid.Row="4" Grid.Column="1" Padding="10,10,40,10"> |
|
0 commit comments