Commit b1ed00b5 by Javier Piris

Creado la vista del XAML de NewConsultation

parent 5862e6bd
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:artina="clr-namespace:UXDivers.Artina.Shared;assembly=UXDivers.Artina.Shared"
x:Class="inutralia.Views.Question.NewConsultationView" x:Class="inutralia.Views.Question.NewConsultationView"
x:Name="newConsultationView"
Title="Nueva Consulta" Title="Nueva Consulta"
Icon="Add1"> Icon="Add1"
BackgroundColor="{DynamicResource BasePageColor}"
>
<ContentPage.Content>
<StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<StackLayout VerticalOptions="FillAndExpand" Margin="10,15,10,15">
<ListView ItemsSource="{Binding NewQuestion}"
ItemTapped="ItemTapped"
IsPullToRefreshEnabled="True"
RefreshCommand="{Binding RefreshNewQuestionCommand}"
IsRefreshing="{Binding IsBusy, Mode=TwoWay}"
BackgroundColor="Transparent"
CachingStrategy="RecycleElement"
Footer=""
HasUnevenRows="True"
x:Name="listNewConsultation">
<!--Aquí se configura el template para cada elemento de la lista-->
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<!--Aquí comienza la definición visual de cada elemento de la lista. Se utiliza un Frame (implica borde redondeado)
dentro del cual va el icono con la notificación seguido del título de la misma-->
<StackLayout Orientation="Horizontal" VerticalOptions="FillAndExpand">
<Image Source="user_chat.png" VerticalOptions="CenterAndExpand" HorizontalOptions="Fill" IsVisible="{Binding FromUser}">
<Image.WidthRequest>
<OnIdiom x:TypeArguments="x:Double"
Phone="50"
Tablet="100"/>
</Image.WidthRequest>
<Image.HeightRequest>
<OnIdiom x:TypeArguments="x:Double"
Phone="50"
Tablet="100"/>
</Image.HeightRequest>
</Image>
<ContentView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" IsVisible="{Binding FromUser}" BackgroundColor="{DynamicResource BasePageColor}">
<StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<StackLayout Style="{StaticResource ChatMessageEntryStyle}">
<Label Text="{Binding Text}" HorizontalOptions="StartAndExpand" TextColor="Black">
<Label.FontSize>
<OnIdiom x:TypeArguments="x:Double"
Phone="15"
Tablet="35"/>
</Label.FontSize>
</Label>
</StackLayout>
</StackLayout>
</ContentView>
<ContentView VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" IsVisible="{Binding FromExpert}" BackgroundColor="{DynamicResource BasePageColor}">
<StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
<StackLayout Style="{StaticResource ChatMessageEntryStyle }">
<Label Text="{Binding Text}" HorizontalOptions="StartAndExpand" TextColor="Black">
<Label.FontSize>
<OnIdiom x:TypeArguments="x:Double"
Phone="15"
Tablet="35"/>
</Label.FontSize>
</Label>
</StackLayout>
</StackLayout>
</ContentView>
<Image Source="nutricionist_chat.png" VerticalOptions="CenterAndExpand" HorizontalOptions="Fill" IsVisible="{Binding FromExpert}">
<Image.WidthRequest>
<OnIdiom x:TypeArguments="x:Double"
Phone="50"
Tablet="100"/>
</Image.WidthRequest>
<Image.HeightRequest>
<OnIdiom x:TypeArguments="x:Double"
Phone="50"
Tablet="100"/>
</Image.HeightRequest>
</Image>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
<StackLayout Orientation="Horizontal" VerticalOptions="End" Margin="10,0,10,0">
<Entry x:Name="newQuest" Placeholder="Escriba su pregunta" HorizontalOptions="FillAndExpand" VerticalOptions="CenterAndExpand">
<Entry.HeightRequest>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="x:Double"
iOS="40"
Android="48"/>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="x:Double"
iOS="70"
Android="65"/>
</OnIdiom.Tablet>
</OnIdiom>
</Entry.HeightRequest>
<Entry.FontSize>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="x:Double"
iOS="25"
Android="17"/>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="x:Double"
iOS="40"
Android="40"/>
</OnIdiom.Tablet>
</OnIdiom>
</Entry.FontSize>
</Entry>
<artina:Button x:Name="buttonNewQuestion"
Image="btn_enviar_chat.png"
HorizontalOptions="End"
VerticalOptions="CenterAndExpand"
Style="{DynamicResource PrimaryActionButtonStyle}"
Clicked="ButtonNewQuestion_Clicked"
>
<Button.HeightRequest>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="x:Double"
iOS="40"
Android="48"/>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="x:Double"
iOS="70"
Android="65"/>
</OnIdiom.Tablet>
</OnIdiom>
</Button.HeightRequest>
<Button.WidthRequest>
<OnIdiom x:TypeArguments="x:Double">
<OnIdiom.Phone>
<OnPlatform x:TypeArguments="x:Double"
iOS="40"
Android="48"/>
</OnIdiom.Phone>
<OnIdiom.Tablet>
<OnPlatform x:TypeArguments="x:Double"
iOS="100"
Android="65"/>
</OnIdiom.Tablet>
</OnIdiom>
</Button.WidthRequest>
</artina:Button>
</StackLayout>
</StackLayout>
</ContentPage.Content>
</ContentPage> </ContentPage>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment