sharee.bike-App/Meinkonrad/TINK/View/Map/MapPage.xaml

120 lines
3.6 KiB
Text
Raw Normal View History

2021-11-07 19:42:59 +01:00
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
2022-09-20 13:51:55 +02:00
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Map.MapPage"
2022-12-07 16:54:52 +01:00
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
Shell.NavBarIsVisible="{Binding IsNavBarVisible}"
2022-09-20 13:51:55 +02:00
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
2022-12-07 16:54:52 +01:00
<Shell.TitleView >
2022-09-20 13:51:55 +02:00
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingMapPage}"/>
</Grid>
</Shell.TitleView>
2022-12-07 16:54:52 +01:00
<ContentPage.Content>
2022-09-20 13:51:55 +02:00
2022-12-07 16:54:52 +01:00
<!--Grid for Map with Buttons and Running process-->
<Grid
RowDefinitions="3,46,1*,32"
ColumnDefinitions="1*,Auto,1*"
IsEnabled="{Binding IsMapPageEnabled}"
VerticalOptions="FillAndExpand">
<!--Map-->
<maps:Map
2022-09-20 13:51:55 +02:00
Grid.RowSpan="3"
Grid.ColumnSpan="3"
WidthRequest="320"
HeightRequest="800"
x:Name="MyMap"
2022-12-13 10:53:08 +01:00
MyLocationEnabled="True"
2022-09-20 13:51:55 +02:00
MapType="Street">
2022-12-07 16:54:52 +01:00
<maps:Map.Behaviors>
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
</maps:Map.Behaviors>
</maps:Map>
2022-09-20 13:51:55 +02:00
2022-12-07 16:54:52 +01:00
<!--Buttons for choosing bike type-->
<Frame
CornerRadius="13"
Grid.Row="1"
Grid.Column="1"
Margin="0"
Padding="0"
IsVisible="{Binding IsNavBarVisible}"
BackgroundColor="{DynamicResource secondary-back-title-color}">
<StackLayout
Orientation="Horizontal"
Margin="0"
Padding="0">
<Button
x:Name="KonradButton"
AutomationId ="FilterKonrad_button"
Text="{x:Static resources:AppResources.MarkingCityBike}"
Command="{Binding OnToggleTinkToKonrad}"
IsVisible="{Binding IsToggleVisible}"
BackgroundColor="{Binding KonradColor}"
BorderColor="{Binding KonradColor}"
BorderWidth="0"
VerticalOptions="Center"
HorizontalOptions="Center"
WidthRequest="94"
HeightRequest="40"
BorderRadius="10"
Margin="3,0,0,0"
FontSize="Small"
FontAttributes="Bold"
TextColor="{Binding NoKonradColor}">
</Button>
<Button
x:Name="TINKButton"
AutomationId ="FilterTINK_button"
Text="{x:Static resources:AppResources.MarkingCargoBike}"
Command="{Binding OnToggleKonradToTink}"
IsVisible="{Binding IsToggleVisible}"
BackgroundColor="{Binding TinkColor}"
BorderColor="{Binding TinkColor}"
BorderWidth="0"
VerticalOptions="Center"
HorizontalOptions="Center"
WidthRequest="94"
HeightRequest="40"
BorderRadius="10"
Margin="0,0,3,0"
FontSize="Small"
FontAttributes="Bold"
TextColor="{Binding NoTinkColor}">
</Button>
</StackLayout>
</Frame>
2022-09-20 13:51:55 +02:00
2022-12-07 16:54:52 +01:00
<!--Info text-->
<Label
Grid.Row="3"
Grid.ColumnSpan="3"
Text="{Binding StatusInfoText}"
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
TextColor="White"
FontSize="Small"
HorizontalOptions="CenterAndExpand"
VerticalOptions="CenterAndExpand"/>
2022-09-20 13:51:55 +02:00
2022-12-07 16:54:52 +01:00
<!--While process is running-->
<sharedGui:RunningProcessView
IsVisible="{Binding IsRunning}"
Grid.RowSpan="4"
Grid.ColumnSpan="3"/>
</Grid>
2022-09-20 13:51:55 +02:00
2022-12-07 16:54:52 +01:00
</ContentPage.Content>
2022-09-20 13:51:55 +02:00
</ContentPage>