Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <ListView Padding="10" Name="LVCards" ItemsSource="{Binding GameDto.Cards}" SelectedItem="{Binding SelectedCard}" SelectionMode="Single" ItemContainerStyle="{DynamicResource ListViewItemStyle1}">
  2. <i:Interaction.Triggers>
  3. <i:EventTrigger EventName="SelectionChanged">
  4. <i:InvokeCommandAction Command="{Binding CardFlippedCommand}"/>
  5. </i:EventTrigger>
  6. </i:Interaction.Triggers>
  7.  
  8. <ListView.Resources>
  9. <Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
  10. <Setter Property="Template">
  11. <Setter.Value>
  12. <ControlTemplate TargetType="{x:Type ListViewItem}">
  13. <Grid MinHeight="100" MinWidth="100">
  14. <Grid.Background>
  15. <ImageBrush ImageSource="{Binding BitmapImage}"/>
  16. </Grid.Background>
  17. </Grid>
  18. </ControlTemplate>
  19. </Setter.Value>
  20. </Setter>
  21. </Style>
  22. </ListView.Resources>
  23. <ListView.ItemsPanel>
  24. <ItemsPanelTemplate>
  25. <WrapPanel Orientation="Horizontal" MaxWidth="{Binding ListWidth}"></WrapPanel>
  26. </ItemsPanelTemplate>
  27. </ListView.ItemsPanel>
  28.  
  29. </ListView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement