/AnalisisImagenView.xaml Secret
Last active
December 14, 2020 18:01
Star
You must be signed in to star a gist
Views/AnalisisImagenView.xaml
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
<?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="ICTalkMobileApp.Views.AnalisisImagenView" | |
xmlns:vm="clr-namespace:ICTalkMobileApp.ViewModels"> | |
<ContentPage.BindingContext> | |
<vm:AnalisisImagenViewModel/> | |
</ContentPage.BindingContext> | |
<ContentPage.Content> | |
<StackLayout Margin="10" Padding="10" Spacing="10"> | |
<StackLayout Orientation="Horizontal" HorizontalOptions="Center"> | |
<Button Command="{Binding ComandoSeleccionarFoto}" | |
Text="Seleccionar foto" | |
BackgroundColor="DarkGreen" | |
TextColor="White" | |
CornerRadius="15"/> | |
<Button Command="{Binding ComandoTomarFoto}" | |
Text="Tomar foto" | |
BackgroundColor="DarkGreen" | |
TextColor="White" | |
CornerRadius="15"/> | |
</StackLayout> | |
<Image Source="{Binding RutaImagen}" | |
WidthRequest="250" | |
HeightRequest="250" /> | |
<StackLayout Orientation="Horizontal" HorizontalOptions="Center"> | |
<Button Command="{Binding ComandoSubirImagen}" | |
Text="Subir imagen" | |
BackgroundColor="Orange" | |
TextColor="White" | |
CornerRadius="15"/> | |
<Button Command="{Binding ComandoObtenerSimilares}" | |
Text="Obtener similares" | |
BackgroundColor="Orange" | |
TextColor="White" | |
CornerRadius="15"/> | |
</StackLayout> | |
<CarouselView ItemsSource="{Binding ImagenesSimilares}" | |
PeekAreaInsets="20"> | |
<CarouselView.ItemTemplate> | |
<DataTemplate> | |
<Grid RowSpacing="0" | |
WidthRequest="150" | |
Padding="5" | |
Margin="5"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*"/> | |
<RowDefinition Height="Auto"/> | |
<RowDefinition Height="Auto"/> | |
</Grid.RowDefinitions> | |
<Image Grid.Row="0" | |
Source="{Binding Nombre}" | |
Aspect="AspectFill"/> | |
<Label Grid.Row="1" | |
TextColor="Blue" | |
Text="{Binding Descripcion}" /> | |
<Label Grid.Row="2" | |
TextColor="Green" | |
Text="{Binding Tags}" /> | |
</Grid> | |
</DataTemplate> | |
</CarouselView.ItemTemplate> | |
</CarouselView> | |
</StackLayout> | |
</ContentPage.Content> | |
</ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment