Created
March 12, 2023 15:36
-
-
Save bbenetskyy/4706d1667110bd16ab6a8591d8c332ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--List of ages--> | |
<ScrollView Orientation="Horizontal" | |
Margin="0,18" | |
HorizontalScrollBarVisibility="Never"> | |
<HorizontalStackLayout Spacing="8"> | |
<BindableLayout.ItemsSource> | |
<x:Array Type="{x:Type xs:SelectableModel}"> | |
<xs:SelectableModel Description="0-15"/> | |
<xs:SelectableModel Description="15-25"/> | |
<xs:SelectableModel Description="25-35"/> | |
<xs:SelectableModel Description="35-45"/> | |
<xs:SelectableModel Description="45-55"/> | |
<xs:SelectableModel Description="55-65"/> | |
<xs:SelectableModel Description="65-75"/> | |
<xs:SelectableModel Description="75-85"/> | |
<xs:SelectableModel Description="85-95"/> | |
</x:Array> | |
</BindableLayout.ItemsSource> | |
<BindableLayout.ItemTemplate> | |
<DataTemplate x:DataType="{x:Type xs:SelectableModel}"> | |
<Frame BorderColor="#BFC6F2" | |
Padding="18,10" | |
HasShadow="False" | |
HorizontalOptions="Start" | |
BackgroundColor="{Binding IsSelected, | |
Converter={StaticResource SelectedToBackgroundColor}}"> | |
<Frame.GestureRecognizers> | |
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped" | |
CommandParameter="{Binding .}" | |
/> | |
</Frame.GestureRecognizers> | |
<Label Text="{Binding Description}" | |
HorizontalOptions="Fill" | |
VerticalOptions="Fill" | |
FontSize="Default" | |
FontFamily="OpenSansRegular" | |
HorizontalTextAlignment="Center" | |
VerticalTextAlignment="Center" | |
TextColor="{Binding IsSelected, | |
Converter={StaticResource SelectedToTextColor}}"/> | |
</Frame> | |
</DataTemplate> | |
</BindableLayout.ItemTemplate> | |
</HorizontalStackLayout> | |
</ScrollView> | |
<Label FontSize="Subtitle" | |
Margin="0,12,0,0" | |
FontFamily="OpenSansSemibold" | |
Text="Ongoing diseases" | |
TextColor="#626262"/> | |
<!--List of diseases--> | |
<ScrollView Orientation="Horizontal" | |
Margin="0,18" | |
HorizontalScrollBarVisibility="Never"> | |
<HorizontalStackLayout Spacing="8"> | |
<BindableLayout.ItemsSource> | |
<x:Array Type="{x:Type xs:SelectableModel}"> | |
<xs:SelectableModel Description="None"/> | |
<xs:SelectableModel Description="Astma"/> | |
<xs:SelectableModel Description="Diabets"/> | |
<xs:SelectableModel Description="Hydatidosis"/> | |
<xs:SelectableModel Description="Plague"/> | |
<xs:SelectableModel Description="Varicella"/> | |
</x:Array> | |
</BindableLayout.ItemsSource> | |
<BindableLayout.ItemTemplate> | |
<DataTemplate x:DataType="{x:Type xs:SelectableModel}"> | |
<Frame BorderColor="#BFC6F2" | |
Padding="18,10" | |
HasShadow="False" | |
HorizontalOptions="Start" | |
BackgroundColor="{Binding IsSelected, | |
Converter={StaticResource SelectedToBackgroundColor}}"> | |
<Frame.GestureRecognizers> | |
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped" | |
CommandParameter="{Binding .}" | |
/> | |
</Frame.GestureRecognizers> | |
<Label Text="{Binding Description}" | |
HorizontalOptions="Fill" | |
VerticalOptions="Fill" | |
FontSize="Default" | |
FontFamily="OpenSansRegular" | |
HorizontalTextAlignment="Center" | |
VerticalTextAlignment="Center" | |
TextColor="{Binding IsSelected, | |
Converter={StaticResource SelectedToTextColor}}"/> | |
</Frame> | |
</DataTemplate> | |
</BindableLayout.ItemTemplate> | |
</HorizontalStackLayout> | |
</ScrollView> | |
<!--Questions Section--> | |
<ScrollView Orientation="Horizontal" | |
Margin="0,8" | |
HorizontalScrollBarVisibility="Never"> | |
<HorizontalStackLayout Spacing="8"> | |
<BindableLayout.ItemsSource> | |
<x:Array Type="{x:Type xs:QuestionableModel}"> | |
<xs:QuestionableModel Question="Bleeding"/> | |
<xs:QuestionableModel Question="Poisoning"/> | |
<xs:QuestionableModel Question="Dizziness"/> | |
</x:Array> | |
</BindableLayout.ItemsSource> | |
<BindableLayout.ItemTemplate> | |
<DataTemplate x:DataType="{x:Type xs:QuestionableModel}"> | |
<Frame BackgroundColor="#F2F2F2" | |
HasShadow="False" | |
CornerRadius="10" | |
Padding="10,16,10,12"> | |
<Grid ColumnDefinitions="*,*" | |
RowDefinitions="auto,*" | |
RowSpacing="22" | |
ColumnSpacing="12"> | |
<Label Grid.ColumnSpan="2" | |
Text="{Binding Question}" | |
HorizontalOptions="Center" | |
FontFamily="OpenSansSemibold" | |
TextColor="#6073E7" | |
FontSize="Body"/> | |
<!--Left Button--> | |
<Frame BorderColor="#BFC6F2" | |
Grid.Row="1" | |
Padding="18,10" | |
MinimumWidthRequest="70" | |
HasShadow="False" | |
HorizontalOptions="Start" | |
BackgroundColor="{Binding Answer, | |
Converter={StaticResource SelectedAnswerToBackgroundColor}, | |
ConverterParameter={x:Static xs:Answer.Yes}}"> | |
<Frame.GestureRecognizers> | |
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped" | |
CommandParameter="{Binding .}" | |
/> | |
</Frame.GestureRecognizers> | |
<Label Text="Yes" | |
HorizontalOptions="Fill" | |
VerticalOptions="Fill" | |
FontSize="Small" | |
FontFamily="OpenSansRegular" | |
HorizontalTextAlignment="Center" | |
VerticalTextAlignment="Center" | |
TextColor="{Binding Answer, | |
Converter={StaticResource SelectedAnswerToTextColor}, | |
ConverterParameter={x:Static xs:Answer.Yes}}"/> | |
</Frame> | |
<!--Right Button--> | |
<Frame BorderColor="#BFC6F2" | |
Grid.Row="1" | |
Grid.Column="1" | |
MinimumWidthRequest="70" | |
Padding="18,10" | |
HasShadow="False" | |
HorizontalOptions="Start" | |
BackgroundColor="{Binding Answer, | |
Converter={StaticResource SelectedAnswerToBackgroundColor}, | |
ConverterParameter={x:Static xs:Answer.No}}"> | |
<Frame.GestureRecognizers> | |
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped" | |
CommandParameter="{Binding .}" | |
/> | |
</Frame.GestureRecognizers> | |
<Label Text="No" | |
HorizontalOptions="Fill" | |
VerticalOptions="Fill" | |
FontSize="Small" | |
FontFamily="OpenSansRegular" | |
HorizontalTextAlignment="Center" | |
VerticalTextAlignment="Center" | |
TextColor="{Binding Answer, | |
Converter={StaticResource SelectedAnswerToTextColor}, | |
ConverterParameter={x:Static xs:Answer.No}}"/> | |
</Frame> | |
</Grid> | |
</Frame> | |
</DataTemplate> | |
</BindableLayout.ItemTemplate> | |
</HorizontalStackLayout> | |
</ScrollView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment