- Introduced a new column 'PaymentType' of type INTEGER to the 'Walks' table. - Set default value for 'PaymentType' to 0. - Implemented migration methods to handle the addition and removal of the column.
724 lines
36 KiB
XML
724 lines
36 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<controls:BaseContentPage
|
|
x:Class="gehGassiApp.Views.Dogs.DogAddView"
|
|
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:behaviors="clr-namespace:gehGassiApp.Behaviors"
|
|
xmlns:controls="clr-namespace:gehGassiApp.Controls"
|
|
xmlns:enum="clr-namespace:gehGassiApp.Domain.Common;assembly=gehGassiApp.Domain"
|
|
xmlns:i="clr-namespace:gehGassiApp.Constants"
|
|
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
|
|
xmlns:res="clr-namespace:gehGassiApp.Resources"
|
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
|
Title="{Binding Title}"
|
|
ControlTemplate="{StaticResource MenuPageTemplate}">
|
|
|
|
<controls:BaseContentPage.TitleView>
|
|
<controls:ShellTitleViewNoLogoControl
|
|
Initials="{Binding CurrentAppUser.Initials}"
|
|
Photo="{Binding CurrentAppUser.Photo}"
|
|
ViewModel="{Binding .}" />
|
|
</controls:BaseContentPage.TitleView>
|
|
|
|
<ContentPage.Content>
|
|
<Grid>
|
|
|
|
<ScrollView
|
|
x:Name="rootScrollView"
|
|
Padding="20"
|
|
HorizontalOptions="Fill"
|
|
IsVisible="{Binding IsNotLoading}"
|
|
VerticalOptions="FillAndExpand">
|
|
|
|
<VerticalStackLayout
|
|
x:Name="rootVerticalStackLayout"
|
|
HorizontalOptions="Fill"
|
|
SizeChanged="rootVerticalStackLayout_SizeChanged"
|
|
Spacing="0"
|
|
VerticalOptions="StartAndExpand">
|
|
|
|
<Grid
|
|
Margin="{StaticResource MarginBig}"
|
|
ColumnDefinitions="*,150,*"
|
|
HorizontalOptions="FillAndExpand"
|
|
VerticalOptions="Start">
|
|
<controls:RoundImageControl
|
|
Grid.Column="1"
|
|
Margin="0,15,0,0"
|
|
Aspect="AspectFit"
|
|
BorderBackgroundColor="{StaticResource Primary_White}"
|
|
BorderHeight="120"
|
|
BorderOpacity="1"
|
|
BorderStroke="{StaticResource Primary_White}"
|
|
BorderStrokeShape="RoundRectangle 12"
|
|
BorderStrokeThickness="2"
|
|
BorderWidth="120"
|
|
CornerRadius="12"
|
|
HorizontalOptions="Center"
|
|
ImageHeight="120"
|
|
ImageOpacity="1"
|
|
ImageSource="{Binding Dog.Photo, Converter={StaticResource MissingPhotoConverter}, ConverterParameter='Dog'}"
|
|
ImageWidth="120"
|
|
VerticalOptions="StartAndExpand" />
|
|
|
|
<Button
|
|
Grid.Column="1"
|
|
Padding="0"
|
|
Background="{StaticResource Primary_DarkBlue_Brush}"
|
|
BorderColor="{StaticResource Primary_DarkBlue}"
|
|
BorderWidth="2"
|
|
Command="{Binding ChoosePhotoOptionCommand}"
|
|
ContentLayout="Left, 0"
|
|
CornerRadius="20"
|
|
HeightRequest="40"
|
|
HorizontalOptions="End"
|
|
Text=""
|
|
VerticalOptions="Start"
|
|
WidthRequest="40">
|
|
<Button.ImageSource>
|
|
<FontImageSource
|
|
FontFamily="MaterialIconsRegular"
|
|
Glyph="photo_camera"
|
|
Size="20"
|
|
Color="{StaticResource Primary_White}" />
|
|
</Button.ImageSource>
|
|
</Button>
|
|
|
|
|
|
<Button
|
|
Grid.Column="1"
|
|
Padding="0"
|
|
Background="{StaticResource Primary_DarkBlue}"
|
|
BorderColor="{StaticResource Primary_DarkBlue}"
|
|
BorderWidth="2"
|
|
Command="{Binding RotateRightCommand}"
|
|
ContentLayout="Left, 0"
|
|
CornerRadius="20"
|
|
HeightRequest="40"
|
|
HorizontalOptions="Start"
|
|
IsVisible="{Binding IsNewPhoto}"
|
|
Text=""
|
|
VerticalOptions="Start"
|
|
WidthRequest="40">
|
|
<Button.ImageSource>
|
|
<FontImageSource
|
|
FontFamily="IconMoon"
|
|
Glyph="{x:Static i:IconsMoon.Icon_Rotate_CW}"
|
|
Size="20"
|
|
Color="{StaticResource Primary_White}" />
|
|
</Button.ImageSource>
|
|
</Button>
|
|
|
|
<Button
|
|
Grid.Column="1"
|
|
Margin="0,15,0,0"
|
|
Padding="0"
|
|
Background="{StaticResource Primary_DarkBlue}"
|
|
BorderColor="{StaticResource Primary_DarkBlue}"
|
|
BorderWidth="2"
|
|
Command="{Binding FlipVerticalCommand}"
|
|
ContentLayout="Left, 0"
|
|
CornerRadius="20"
|
|
HeightRequest="40"
|
|
HorizontalOptions="Start"
|
|
IsVisible="{Binding IsNewPhoto}"
|
|
Text=""
|
|
VerticalOptions="Center"
|
|
WidthRequest="40">
|
|
<Button.ImageSource>
|
|
<FontImageSource
|
|
FontFamily="IconMoon"
|
|
Glyph="{x:Static i:IconsMoon.Icon_Reflect}"
|
|
Size="20"
|
|
Color="{StaticResource Primary_White}" />
|
|
</Button.ImageSource>
|
|
</Button>
|
|
|
|
<Button
|
|
Grid.Column="1"
|
|
Margin="0,0,0,-15"
|
|
Padding="0"
|
|
Background="{StaticResource Primary_DarkBlue}"
|
|
BorderColor="{StaticResource Primary_DarkBlue}"
|
|
BorderWidth="2"
|
|
Command="{Binding RotateLeftCommand}"
|
|
ContentLayout="Left, 0"
|
|
CornerRadius="20"
|
|
HeightRequest="40"
|
|
HorizontalOptions="Start"
|
|
IsVisible="{Binding IsNewPhoto}"
|
|
Text=""
|
|
VerticalOptions="End"
|
|
WidthRequest="40">
|
|
<Button.ImageSource>
|
|
<FontImageSource
|
|
FontFamily="IconMoon"
|
|
Glyph="{x:Static i:IconsMoon.Icon_Rotate_CCW}"
|
|
Size="18"
|
|
Color="{StaticResource Primary_White}" />
|
|
</Button.ImageSource>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Inter_Blue}"
|
|
Text="{x:Static res:Text.Dog_Name_Question}" />
|
|
<Border
|
|
Grid.Row="1"
|
|
Margin="{StaticResource MarginBig}"
|
|
Style="{StaticResource EntryBorder}">
|
|
<Entry
|
|
x:Name="name"
|
|
Keyboard="Text"
|
|
Placeholder="{x:Static res:Text.Common_Name}"
|
|
Text="{Binding Dog.Name}">
|
|
<Entry.Behaviors>
|
|
<toolkit:TextValidationBehavior
|
|
x:Name="nameValidation"
|
|
Flags="ValidateOnValueChanged"
|
|
InvalidStyle="{StaticResource InvalidEntryStyle}"
|
|
MaximumLength="100"
|
|
MinimumLength="1" />
|
|
</Entry.Behaviors>
|
|
</Entry>
|
|
</Border>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Inter_Blue}"
|
|
Text="{x:Static res:Text.Dog_Race_Question}" />
|
|
<Border Margin="{StaticResource MarginBig}" Style="{StaticResource EntryBorder}">
|
|
<controls:PickerWithChevron
|
|
Title="{x:Static res:Text.Dog_Race_Select}"
|
|
ios:Picker.UpdateMode="WhenFinished"
|
|
HorizontalOptions="Fill"
|
|
ItemDisplayBinding="{Binding Name}"
|
|
ItemsSource="{Binding DogRaces}"
|
|
SelectedItem="{Binding SelectedDogRace}" />
|
|
</Border>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Inter_Blue}"
|
|
Text="{x:Static res:Text.Dog_Sex_Question}" />
|
|
<Border Margin="{StaticResource MarginBig}" Style="{StaticResource EntryBorder}">
|
|
<controls:PickerWithChevron
|
|
Title="{x:Static res:Text.Common_Select}"
|
|
ios:Picker.UpdateMode="WhenFinished"
|
|
HorizontalOptions="Fill"
|
|
ItemDisplayBinding="{Binding Text}"
|
|
ItemsSource="{Binding SexItems}"
|
|
SelectedItem="{Binding SelectedSex}" />
|
|
</Border>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Inter_Blue}"
|
|
Text="{x:Static res:Text.Dog_Size_Question}" />
|
|
<Border Margin="{StaticResource MarginBig}" Style="{StaticResource EntryBorder}">
|
|
<controls:PickerWithChevron
|
|
Title="{x:Static res:Text.Common_Select}"
|
|
ios:Picker.UpdateMode="WhenFinished"
|
|
HorizontalOptions="Fill"
|
|
ItemDisplayBinding="{Binding Text}"
|
|
ItemsSource="{Binding SizeItems}"
|
|
SelectedItem="{Binding SelectedSize}" />
|
|
</Border>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Inter_Blue}"
|
|
Text="{x:Static res:Text.Dog_Age_Question}" />
|
|
<Border
|
|
Grid.Row="9"
|
|
Margin="{StaticResource MarginSection}"
|
|
Style="{StaticResource EntryBorder}">
|
|
<Grid>
|
|
<Entry
|
|
HorizontalOptions="Fill"
|
|
Keyboard="Default"
|
|
Placeholder="{Binding BirthdateFormat}"
|
|
Text="{Binding BirthDay}"
|
|
VerticalOptions="Center">
|
|
<Entry.Behaviors>
|
|
<toolkit:TextValidationBehavior
|
|
x:Name="birthdayTextValidation"
|
|
Flags="ValidateOnValueChanged"
|
|
InvalidStyle="{StaticResource InvalidEntryStyle}"
|
|
MaximumLength="10"
|
|
MinimumLength="1" />
|
|
<behaviors:DateValidationBehavior
|
|
x:Name="birthdayValidation"
|
|
Flags="ValidateOnValueChanged"
|
|
InvalidStyle="{StaticResource InvalidEntryStyle}"
|
|
MaxDate="{Binding MaxDate}"
|
|
MinDate="01/01/1900" />
|
|
<behaviors:SelectAllFocusedEntryBehavior />
|
|
</Entry.Behaviors>
|
|
</Entry>
|
|
<Image HeightRequest="25" HorizontalOptions="End">
|
|
<Image.Source>
|
|
<FontImageSource
|
|
FontFamily="IconMoon"
|
|
Glyph="{x:Static i:IconsMoon.Icon_Calendar}"
|
|
Size="25"
|
|
Color="{StaticResource Primary_DarkBlue}" />
|
|
</Image.Source>
|
|
<Image.GestureRecognizers>
|
|
<TapGestureRecognizer Command="{Binding ShowBirthdayCalendarCommand}" CommandParameter="{x:Reference birthDatePicker}" />
|
|
</Image.GestureRecognizers>
|
|
</Image>
|
|
<DatePicker
|
|
x:Name="birthDatePicker"
|
|
Date="{Binding BirthDate}"
|
|
HeightRequest="0"
|
|
MaximumDate="{Binding MaxDate}"
|
|
MinimumDate="01/01/1900"
|
|
WidthRequest="0" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginMid}"
|
|
Style="{StaticResource H3_Blue}"
|
|
Text="{x:Static res:Text.Dog_Section_Personality}" />
|
|
|
|
<VerticalStackLayout Margin="{StaticResource MarginMid}" VerticalOptions="StartAndExpand">
|
|
<Grid
|
|
ColumnDefinitions="*,Auto"
|
|
RowDefinitions="*,*,*,*,*,*,Auto"
|
|
RowSpacing="12"
|
|
VerticalOptions="StartAndExpand">
|
|
|
|
<Label
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.LikesAdults}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_LikesAdults}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.LikesAdults}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.LikesConspecifics}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_LikesConspecifics}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.LikesConspecifics}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.IsTrustful}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsTrustful}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.IsTrustful}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.IsLoneGunner}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsLoneGunner}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.IsLoneGunner}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.HouseTrained}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_HouseTrained}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.HouseTrained}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="5"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.IsAggressiv}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsAggressiv}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="5"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.IsAggressiv}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="6"
|
|
Grid.ColumnSpan="2"
|
|
IsVisible="{Binding Dog.IsAggressiv}"
|
|
Style="{StaticResource Inter_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsAggressiv_Question}"
|
|
VerticalOptions="Center" />
|
|
</Grid>
|
|
<Grid
|
|
Margin="0,8,0,12"
|
|
ColumnDefinitions="*,*,*"
|
|
ColumnSpacing="10"
|
|
IsVisible="{Binding Dog.IsAggressiv}"
|
|
RadioButtonGroup.GroupName="aggression"
|
|
RadioButtonGroup.SelectedValue="{Binding Dog.AggressionLevel}">
|
|
<RadioButton
|
|
Grid.Column="0"
|
|
ControlTemplate="{StaticResource ButtonGroupTemplate}"
|
|
FontSize="{StaticResource FontInter}"
|
|
Value="{x:Static enum:DogAggressionLevel.Low}" />
|
|
<RadioButton
|
|
Grid.Column="1"
|
|
ControlTemplate="{StaticResource ButtonGroupTemplate}"
|
|
FontSize="{StaticResource FontInter}"
|
|
Value="{x:Static enum:DogAggressionLevel.Medium}" />
|
|
<RadioButton
|
|
Grid.Column="2"
|
|
ControlTemplate="{StaticResource ButtonGroupTemplate}"
|
|
FontSize="{StaticResource FontInter}"
|
|
Value="{x:Static enum:DogAggressionLevel.High}" />
|
|
</Grid>
|
|
</VerticalStackLayout>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginMid}"
|
|
Style="{StaticResource H3_Blue}"
|
|
Text="{x:Static res:Text.Dog_Section_Behavior}" />
|
|
|
|
<Grid
|
|
Margin="{StaticResource MarginSection}"
|
|
ColumnDefinitions="*,Auto"
|
|
RowDefinitions="*,*,*,*,*"
|
|
RowSpacing="12">
|
|
|
|
<Label
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.PullsTheLeash}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_PullsTheLeash}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.PullsTheLeash}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.BasicCommands}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_BasicCommands}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.BasicCommands}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.Hunter}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_Hunter}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.Hunter}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.Eating}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_Eating}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.Eating}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.Jumper}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_Jumper}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.Jumper}"
|
|
VerticalOptions="Center" />
|
|
|
|
</Grid>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginMid}"
|
|
Style="{StaticResource H3_Blue}"
|
|
Text="{x:Static res:Text.Dog_Section_Visit}" />
|
|
|
|
<Grid
|
|
Margin="{StaticResource MarginSection}"
|
|
ColumnDefinitions="*,Auto"
|
|
RowDefinitions="*,*,*,*,*"
|
|
RowSpacing="12">
|
|
|
|
<Label
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.RushesOutside}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_RushesOutside}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.RushesOutside}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.IsCalm}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsCalm}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.IsCalm}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.IsPeeing}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsPeeing}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.IsPeeing}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="3"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.IsShy}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsShy}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.IsShy}"
|
|
VerticalOptions="Center" />
|
|
|
|
<Label
|
|
Grid.Row="4"
|
|
Grid.Column="0"
|
|
IsEnabled="{Binding Dog.IsGuard}"
|
|
LineBreakMode="TailTruncation"
|
|
Style="{StaticResource BodySMedium_Blue}"
|
|
Text="{x:Static res:Text.Dog_IsGuard}"
|
|
VerticalOptions="Center" />
|
|
<Switch
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
IsToggled="{Binding Dog.IsGuard}"
|
|
VerticalOptions="Center" />
|
|
|
|
</Grid>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginMid}"
|
|
Style="{StaticResource H3_Blue}"
|
|
Text="{x:Static res:Text.Dog_Section_Medical}" />
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Menu_Blue}"
|
|
Text="{x:Static res:Text.Dog_Intolerances_Question}"
|
|
VerticalOptions="Center" />
|
|
<Border Margin="{StaticResource MarginSmall}" Style="{StaticResource EntryBorder}">
|
|
<Editor
|
|
AutoSize="TextChanges"
|
|
Keyboard="Text"
|
|
MaxLength="500"
|
|
Text="{Binding Dog.Intolerances}">
|
|
<Editor.Behaviors>
|
|
<toolkit:TextValidationBehavior
|
|
x:Name="intolerancesValidation"
|
|
Flags="ValidateOnValueChanged"
|
|
InvalidStyle="{StaticResource InvalidEntryStyle}"
|
|
MaximumLength="500"
|
|
MinimumLength="0" />
|
|
</Editor.Behaviors>
|
|
</Editor>
|
|
</Border>
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Menu_Blue}"
|
|
Text="{x:Static res:Text.Dog_MedicalInfo}"
|
|
VerticalOptions="Center" />
|
|
<Border Margin="{StaticResource MarginSection}" Style="{StaticResource EntryBorder}">
|
|
<Editor
|
|
AutoSize="TextChanges"
|
|
Keyboard="Text"
|
|
MaxLength="500"
|
|
Text="{Binding Dog.MedicalInfo}"
|
|
VerticalOptions="FillAndExpand">
|
|
<Editor.Behaviors>
|
|
<toolkit:TextValidationBehavior
|
|
x:Name="medicalInfoValidation"
|
|
Flags="ValidateOnValueChanged"
|
|
InvalidStyle="{StaticResource InvalidEntryStyle}"
|
|
MaximumLength="500"
|
|
MinimumLength="0" />
|
|
</Editor.Behaviors>
|
|
</Editor>
|
|
</Border>
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginMid}"
|
|
Style="{StaticResource H3_Blue}"
|
|
Text="{x:Static res:Text.Dog_Section_Sitting}" />
|
|
|
|
<Label
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Menu_Blue}"
|
|
Text="{x:Static res:Text.Dog_FeedingTimes}"
|
|
VerticalOptions="Center" />
|
|
<VerticalStackLayout Margin="{StaticResource MarginBig}">
|
|
<Grid
|
|
ColumnDefinitions="*,*,*,*"
|
|
ColumnSpacing="10"
|
|
RadioButtonGroup.GroupName="feeding"
|
|
RadioButtonGroup.SelectedValue="{Binding Dog.FeedingTimes}"
|
|
RowDefinitions="Auto">
|
|
<RadioButton
|
|
Grid.Column="0"
|
|
ControlTemplate="{StaticResource ButtonGroupSmallTemplate}"
|
|
Value="{x:Static enum:DogFeedingTimes.Morning}" />
|
|
<RadioButton
|
|
Grid.Column="1"
|
|
ControlTemplate="{StaticResource ButtonGroupSmallTemplate}"
|
|
Value="{x:Static enum:DogFeedingTimes.Evening}" />
|
|
<RadioButton
|
|
Grid.Column="2"
|
|
ControlTemplate="{StaticResource ButtonGroupSmallTemplate}"
|
|
Value="{x:Static enum:DogFeedingTimes.Both}" />
|
|
<RadioButton
|
|
Grid.Column="3"
|
|
ControlTemplate="{StaticResource ButtonGroupSmallTemplate}"
|
|
Value="{x:Static enum:DogFeedingTimes.Individual}" />
|
|
</Grid>
|
|
<Border
|
|
Margin="0,12,0,0"
|
|
IsVisible="{Binding Dog.FeedingTimes, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static enum:DogFeedingTimes.Individual}}"
|
|
Style="{StaticResource EntryBorder}">
|
|
<Editor
|
|
AutoSize="TextChanges"
|
|
Keyboard="Text"
|
|
MaxLength="500"
|
|
Placeholder="{x:Static res:Text.Dog_FeedingIndividual_Placeholder}"
|
|
Text="{Binding Dog.FeedingIndividual}" />
|
|
</Border>
|
|
</VerticalStackLayout>
|
|
|
|
<Label
|
|
Grid.Row="0"
|
|
Margin="{StaticResource MarginLabel}"
|
|
Style="{StaticResource Menu_Blue}"
|
|
Text="{x:Static res:Text.Dog_Description_Question}" />
|
|
<Border
|
|
Grid.Row="1"
|
|
Margin="{StaticResource MarginBig}"
|
|
Style="{StaticResource EntryBorder}">
|
|
<Editor
|
|
AutoSize="TextChanges"
|
|
Keyboard="Text"
|
|
MaxLength="5000"
|
|
MinimumHeightRequest="100"
|
|
Text="{Binding Dog.Description}" />
|
|
</Border>
|
|
|
|
<ActivityIndicator
|
|
HorizontalOptions="Center"
|
|
IsRunning="{Binding IsSaving}"
|
|
IsVisible="{Binding IsSaving}"
|
|
Scale="1"
|
|
VerticalOptions="Center" />
|
|
|
|
<Button Command="{Binding SaveCommand}" Text="{x:Static res:Text.Button_Save}">
|
|
<Button.IsEnabled>
|
|
<MultiBinding Converter="{StaticResource AllTrueMultiConverter}">
|
|
<Binding Path="IsValid" Source="{x:Reference nameValidation}" />
|
|
<Binding Path="IsValid" Source="{x:Reference birthdayTextValidation}" />
|
|
<Binding Path="IsValid" Source="{x:Reference birthdayValidation}" />
|
|
<Binding Path="IsValid" Source="{x:Reference intolerancesValidation}" />
|
|
<Binding Path="IsValid" Source="{x:Reference medicalInfoValidation}" />
|
|
<Binding Path="DogRaceValid" />
|
|
<Binding Path="IsNotBusy" />
|
|
</MultiBinding>
|
|
</Button.IsEnabled>
|
|
</Button>
|
|
|
|
</VerticalStackLayout>
|
|
|
|
</ScrollView>
|
|
<VerticalStackLayout IsVisible="{Binding IsLoading}" VerticalOptions="CenterAndExpand">
|
|
<ActivityIndicator
|
|
HorizontalOptions="Center"
|
|
IsRunning="{Binding IsLoading}"
|
|
IsVisible="{Binding IsLoading}"
|
|
Scale="2"
|
|
VerticalOptions="Center" />
|
|
</VerticalStackLayout>
|
|
</Grid>
|
|
</ContentPage.Content>
|
|
</controls:BaseContentPage> |