sharee.bike-App/Meinkonrad/TINK/View/BikesAtStation/BikesAtStationPage.xaml
2022-12-07 16:54:52 +01:00

124 lines
3.3 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
xmlns:local_bike="clr-namespace:TINK.View.Bike"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="{Binding IsIdle}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
<Label Style="{StaticResource Label-Navbar}"
Text="{Binding Title}"/>
</Grid>
</Shell.TitleView>
<ContentPage.Resources>
<ResourceDictionary>
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<!--Grid for Bike(s) view and Running process in same row-->
<Grid>
<Frame
Grid.Row="0">
<!-- Grid for Content -->
<Grid
RowDefinitions="Auto,1*,Auto,Auto">
<!--Station-->
<StackLayout
Grid.Row="0"
Orientation="Vertical">
<!--Title-->
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
TextColor="{DynamicResource primary-back-title-color}"
Text="{Binding StationDetailText}"/>
<!--Line-->
<BoxView
HeightRequest="1"
Color="{DynamicResource primary-back-title-color}"/>
</StackLayout>
<!--Bike(s)-->
<ListView Grid.Row="1"
x:Name="BikesAtStationListView"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
IsVisible="{Binding IsBikesListVisible}"
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<!--No Bikes-->
<Label Grid.Row="1"
IsVisible="{Binding IsNoBikesAtStationVisible}"
Text="{Binding NoBikesAtStationText}"/>
<!--Info text-->
<Label
Grid.Row="2"
Text="{Binding StatusInfoText}"
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
FontSize="Small"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
<!-- Contact and Login at end of page-->
<StackLayout
Grid.Row="3"
Orientation="Vertical">
<!--Line-->
<BoxView
HeightRequest="1"
Color="{DynamicResource primary-back-title-color}"/>
<!--Contact to operator-->
<Label
TextType="Html"
Text="{Binding ContactSupportHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
<!--Login required-->
<Label
IsVisible="{Binding IsLoginRequiredHintVisible}"
TextType="Html"
Text="{Binding LoginRequiredHintText}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Grid>
</Frame>
<!--While process is running-->
<sharedGui:RunningProcessView
IsVisible="{Binding IsRunning}"
Grid.Row="0"/>
</Grid>
</ContentPage.Content>
</ContentPage>