I am trying to add pinch to zoom feature to a data bound ListBox. What is the most efficient way to do this? I have placed the ListBox inside a Grid control and made it scrollable.
This is my current code.
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="10,0,10,10" Background="Black" >
<ListBox Name="lstText" FontSize="24" Foreground="White" SelectionMode="Single" Margin="10,0,10,10" ScrollViewer.VerticalScrollBarVisibility="Visible" >
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel >
<TextBlock Text="{Binding Text}" TextWrapping="Wrap"></TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
<toolkit:GestureService.GestureListener>
<toolkit:GestureListener
Tap="GestureListener_Tap"
PinchCompleted="GestureListener_PinchCompleted"
Flick="GestureListener_Flick">
</toolkit:GestureListener>
</toolkit:GestureService.GestureListener>