Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ListView Padding="10" Name="LVCards" ItemsSource="{Binding GameDto.Cards}" SelectedItem="{Binding SelectedCard}" SelectionMode="Single" ItemContainerStyle="{DynamicResource ListViewItemStyle1}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding CardFlippedCommand}"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- <ListView.Resources>
- <Style x:Key="ListViewItemStyle1" TargetType="{x:Type ListViewItem}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListViewItem}">
- <Grid MinHeight="100" MinWidth="100">
- <Grid.Background>
- <ImageBrush ImageSource="{Binding BitmapImage}"/>
- </Grid.Background>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ListView.Resources>
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" MaxWidth="{Binding ListWidth}"></WrapPanel>
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- </ListView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement