I have a ListPicker where each item is a musical instrument. You can select only one item at a time. Each item next to the tool name has a button that plays a preview sample.
ListPicker Template:
<DataTemplate x:Name="ListFullModeItemTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto"/> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <c4f:RoundButton Grid.Column="0" Tag="{Binding Id}" ImageSource="/Content/AppBarIcons/play.png" Click="instrumentPreview_Click" /> <TextBlock Grid.Column="1" toolkit:TiltEffect.IsTiltEnabled="True" Text="{Binding Name}" VerticalAlignment="Center" FontSize="35"/> </Grid> </DataTemplate>
Unfortunately, clicking the button automatically closes the ListPicker dialog box, which is not what I want. I was thinking about marking the instrumentPreview_Click event as processed, but RoutedEventArgs does not have this property in WP7 (unlike WPF)
gumis source share