parent
0367cf5614
commit
2f6bb98c2e
@ -0,0 +1,32 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
||||||
|
x:Class="PageLayout.ByGridLayout"> |
||||||
|
|
||||||
|
<Grid RowDefinitions="Auto,Auto,Auto,*,Auto,Auto,Auto" |
||||||
|
ColumnDefinitions="*,*" |
||||||
|
Padding="40"> |
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Text="Bill" VerticalTextAlignment="Center"/> |
||||||
|
<Entry x:Name="billInput" Placeholder="Enter Amount" Keyboard="Numeric" |
||||||
|
Grid.Row="0" Grid.Column="1" /> |
||||||
|
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Text="Tip" /> |
||||||
|
<Label Grid.Row="1" Grid.Column="1" x:Name="tipOutput" Text="0.00" /> |
||||||
|
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Text="Total" /> |
||||||
|
<Label x:Name="totalOutput" Text="0.00" |
||||||
|
Grid.Row="2" Grid.Column="1"/> |
||||||
|
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Text="Tip Percentage" /> |
||||||
|
<Label Grid.Row="3" Grid.Column="1" x:Name="tipPercent" Text="15%" /> |
||||||
|
<Slider Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" x:Name="tipPercentSlider" Minimum="0" Maximum="100" Value="15" /> |
||||||
|
|
||||||
|
<Button Grid.Row="5" Grid.Column="0" Margin="5" Text="15%" /> |
||||||
|
<Button Grid.Row="5" Grid.Column="1" Margin="5" Text="20%" /> |
||||||
|
|
||||||
|
<Button Grid.Row="6" Grid.Column="0" Margin="5" x:Name="roundDown" Text="Round Down" /> |
||||||
|
<Button Grid.Row="6" Grid.Column="1" Margin="5" x:Name="roundUp" Text="Round Up" /> |
||||||
|
</Grid> |
||||||
|
|
||||||
|
</ContentView> |
@ -0,0 +1,9 @@ |
|||||||
|
namespace PageLayout; |
||||||
|
|
||||||
|
public partial class ByGridLayout : ContentView |
||||||
|
{ |
||||||
|
public ByGridLayout() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,40 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
||||||
|
x:Class="PageLayout.ByStackLayout"> |
||||||
|
<VerticalStackLayout Padding="40" Spacing="10"> |
||||||
|
|
||||||
|
<HorizontalStackLayout Spacing="10"> |
||||||
|
<Label Text="Bill" WidthRequest="100" VerticalOptions="Center" /> |
||||||
|
<Entry x:Name="billInput" Placeholder="Enter Amount" Keyboard="Numeric" /> |
||||||
|
</HorizontalStackLayout> |
||||||
|
|
||||||
|
<HorizontalStackLayout Margin="0,20,0,0" Spacing="10"> |
||||||
|
<Label Text="Tip" WidthRequest="100" /> |
||||||
|
<Label x:Name="tipOutput" Text="0.00" /> |
||||||
|
</HorizontalStackLayout> |
||||||
|
|
||||||
|
<HorizontalStackLayout Spacing="10"> |
||||||
|
<Label Text="Total" WidthRequest="100" /> |
||||||
|
<Label x:Name="totalOutput" Text="0.00" /> |
||||||
|
</HorizontalStackLayout> |
||||||
|
|
||||||
|
<HorizontalStackLayout VerticalOptions="End" Spacing="10"> |
||||||
|
<Label Text="Tip Percentage" WidthRequest="100" /> |
||||||
|
<Label x:Name="tipPercent" Text="15%" /> |
||||||
|
</HorizontalStackLayout> |
||||||
|
|
||||||
|
<Slider x:Name="tipPercentSlider" Minimum="0" Maximum="100" Value="15" /> |
||||||
|
|
||||||
|
<HorizontalStackLayout Margin="0,20,0,0" Spacing="10"> |
||||||
|
<Button Text="15%" WidthRequest="150" HorizontalOptions="Center" /> |
||||||
|
<Button Text="20%" WidthRequest="150" HorizontalOptions="Center" /> |
||||||
|
</HorizontalStackLayout> |
||||||
|
|
||||||
|
<HorizontalStackLayout Margin="0,20,0,0" Spacing="10"> |
||||||
|
<Button x:Name="roundDown" WidthRequest="150" HorizontalOptions="Center" Text="Round Down" /> |
||||||
|
<Button x:Name="roundUp" WidthRequest="150" HorizontalOptions="Center" Text="Round Up" /> |
||||||
|
</HorizontalStackLayout> |
||||||
|
|
||||||
|
</VerticalStackLayout> |
||||||
|
</ContentView> |
@ -0,0 +1,9 @@ |
|||||||
|
namespace PageLayout; |
||||||
|
|
||||||
|
public partial class ByStackLayout : ContentView |
||||||
|
{ |
||||||
|
public ByStackLayout() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue