Skip to content

Instantly share code, notes, and snippets.

@hatsunea
Created November 27, 2020 05:44
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 hatsunea/81884679b65038e39c09fb25ad39ed54 to your computer and use it in GitHub Desktop.
Save hatsunea/81884679b65038e39c09fb25ad39ed54 to your computer and use it in GitHub Desktop.
<Page
x:Class="ImageFilePickerSample.Views.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ImageFilePickerSample.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
DataContext="{Binding ViewModel, RelativeSource={RelativeSource Mode=Self}}">
<Grid>
<ListView ItemsSource="{x:Bind ViewModel.Items}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Button Content="Get Picture" Command="{Binding GetImageCommand}" CommandParameter="{Binding ID}"/>
<Image Source="{Binding ImageItem}" Width="160" Height="160" Stretch="UniformToFill"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment