Skip to content

Instantly share code, notes, and snippets.

@icebeam7
Created November 21, 2019 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icebeam7/c279332be4b00588dd30756a4badd42c to your computer and use it in GitHub Desktop.
Save icebeam7/c279332be4b00588dd30756a4badd42c to your computer and use it in GitHub Desktop.
DemoCamara: PhotoView.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:DemoCamara.ViewModels"
mc:Ignorable="d"
Title="Pictures"
x:Class="DemoCamara.Views.PhotoView">
<ContentPage.BindingContext>
<vm:PhotoViewModel/>
</ContentPage.BindingContext>
<ContentPage.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<Image Source="{Binding Photo}" WidthRequest="300" HeightRequest="300" Aspect="AspectFit" />
<Button Text="Take Photo" Command="{Binding TakePhotoCommand}" />
<Button Text="Choose Photo" Command="{Binding ChoosePhotoCommand}" />
</StackLayout>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment