Skip to content

Instantly share code, notes, and snippets.

@jasondown
Created August 3, 2021 07:36
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 jasondown/5ab72fb74a4e002fd7a814be7b398427 to your computer and use it in GitHub Desktop.
Save jasondown/5ab72fb74a4e002fd7a814be7b398427 to your computer and use it in GitHub Desktop.
<ItemsControl Grid.Row="1"
Grid.Column="1"
Margin="2,0,2,0"
VerticalAlignment="Center"
Background="White"
ItemsSource="{Binding PageableImages}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Margin="10,0,10,0"
BorderBrush="Transparent"
Command="{Binding RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type UserControl}},
Path=DataContext.DisplayLargeImage}"
CommandParameter="{Binding Path=ItemImage}"
Style="{StaticResource InvisibleButtonStyle}">
<Border Width="60"
Height="60"
HorizontalAlignment="Center"
VerticalAlignment="Center"
BorderBrush="Black"
BorderThickness="1">
<Image Width="60"
Height="60"
Source="{Binding Path=ItemImage.Source}" />
</Border>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment