Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/TravelMonkey/Views/AddPicturePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
</yummy:PancakeView>

<yummy:PancakeView Grid.Row="2" BackgroundColor="#44FFFFFF" CornerRadius="5" Padding="2">
<Label Text="{Binding PictureDescription}" HorizontalTextAlignment="Center" />
<yummy:PancakeView.GestureRecognizers>
<TapGestureRecognizer Tapped="TranslateDescription_Tapped" />
</yummy:PancakeView.GestureRecognizers>
<StackLayout Orientation="Horizontal" VerticalOptions="Center" Margin="10,0">
<Label FontSize="20" VerticalOptions="Center" TextColor="Gray" FontFamily="FontAwesomeSolid" Text="" Margin="0,0,12,0" />
<Label x:Name="PictureDescriptionLabel" Text="{Binding PictureDescription}" HorizontalTextAlignment="Center" />
</StackLayout>
</yummy:PancakeView>

<Button Grid.Row="3" Text="Add Picture" FontAttributes="Bold" BackgroundColor="{Binding PictureAccentColor}" TextColor="White" Command="{Binding AddPictureCommand}" />
Expand Down
11 changes: 11 additions & 0 deletions src/TravelMonkey/Views/AddPicturePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,16 @@ private void Button_Clicked(object sender, EventArgs e)
{
Navigation.PopModalAsync();
}

private async void TranslateDescription_Tapped(object sender, EventArgs e)
{
if (string.IsNullOrWhiteSpace(PictureDescriptionLabel.Text))
{
await DisplayAlert("No description text", "You didn't take or choose a photo!", "OK");
return;
}

await Navigation.PushModalAsync(new TranslationResultPage(PictureDescriptionLabel.Text));
}
}
}