Skip to content

Instantly share code, notes, and snippets.

@gep13
Created July 30, 2015 11:38
Show Gist options
  • Save gep13/4f6aaa57c6d37d09b2c1 to your computer and use it in GitHub Desktop.
Save gep13/4f6aaa57c6d37d09b2c1 to your computer and use it in GitHub Desktop.
<ListView ItemsSource="{Binding Talks, Mode=TwoWay}" IsItemClickEnabled="True">
<interactivity:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="ItemClick">
<actions:OpenMenuFlyoutAction />
</core:EventTriggerBehavior>
</interactivity:Interaction.Behaviors>
<FlyoutBase.AttachedFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="Edit" />
<MenuFlyoutItem Text="Delete" />
</MenuFlyout>
</FlyoutBase.AttachedFlyout>
<ListView.ItemTemplate>
<DataTemplate>
<Grid Height="110" Margin="6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal">
<Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}" Width="110" Height="110">
<Image Source="{Binding Image}" Stretch="UniformToFill"/>
</Border>
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,0,0,0">
<TextBlock Text="{Binding Name}" TextWrapping="NoWrap"/>
</StackPanel>
</StackPanel>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment