-
Notifications
You must be signed in to change notification settings - Fork 2
/
MainPage.xaml
70 lines (70 loc) · 3.44 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
x:Class="BikeAvailability.MainPage"
Title="Bike availability">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<esri:MapView x:Name="mapView"
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
Map="{Binding Map}"
GraphicsOverlays="{Binding GraphicsOverlays}"
GeoViewTapped="MapViewTapped"/>
<Border x:Name="BikeInventoryPanel"
WidthRequest="240" HeightRequest="120"
VerticalOptions="Start" HorizontalOptions="Start"
StrokeShape="RoundRectangle 10"
Margin="10"
BackgroundColor="Purple" Opacity=".7"
IsVisible="false">
<Grid ColumnDefinitions="*,*"
ColumnSpacing="15"
VerticalOptions="Center"
RowDefinitions="auto,auto,auto,auto,auto"
RowSpacing="5">
<Label x:Name="CityLabel" Grid.Row="0" Grid.ColumnSpan="2"
HorizontalOptions="Center"
FontAttributes="Bold" TextColor="Cyan"
Text="{Binding CityName}"/>
<Label Grid.Row="1"
FontAttributes="Bold" TextColor="AliceBlue"
HorizontalTextAlignment="End"
Text="Total Bikes:"/>
<Label Grid.Row="1" Grid.Column="1"
TextColor="AliceBlue"
Text="{Binding TotalBikes, StringFormat='{0:N0}'}"/>
<Label Grid.Row="2"
FontAttributes="Bold" TextColor="AliceBlue"
HorizontalTextAlignment="End"
Text="Available:"/>
<Label Grid.Row="2" Grid.Column="1"
TextColor="AliceBlue"
Text="{Binding BikesAvailable, StringFormat='{0:N0}'}"/>
<Label Grid.Row="3"
FontAttributes="Bold" TextColor="AliceBlue"
HorizontalTextAlignment="End"
Text="Out:"/>
<Label Grid.Row="3" Grid.Column="1"
TextColor="AliceBlue"
Text="{Binding BikesOut, StringFormat='{0:N0}'}"/>
<ProgressBar Grid.Row="4" Grid.ColumnSpan="2" Margin="5,0"
ProgressColor="Blue" BackgroundColor="Purple"
Progress="{Binding PercentBikesAvailable}"
ToolTipProperties.Text="{Binding PercentBikesAvailable, StringFormat='{0:P0}'}"/>
</Grid>
</Border>
<Picker x:Name="CityPicker" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"
Title="Select a city"
ItemsSource="{Binding CityList}"
SelectedIndexChanged="CityPicker_SelectedIndexChanged"/>
</Grid>
</ContentPage>