How can I show images with scrollable textblock in ListBox elements on Windows Phone 7.5?

W

WPCentral Question

I have a horizontal scrollable ListBox with Binding. A ListBox item: -Image -Text about image

I would like to show, that I can scroll horizontally between images and I can scroll vertically on textblock.

I try it this xaml code:

<ListBox Name="lstB" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Visible">
<ListBoxItem>
<VirtualizingStackPanel Orientation="Horizontal"/>
</ListBoxItem>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<Border BorderThickness="2" BorderBrush="Black" Height="300" Width="410">
<Image Source="{Binding Url}"/>
</Border>

<TextBlock Text="{Binding Comment}" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
 

Members online

Forum statistics

Threads
323,300
Messages
2,243,598
Members
428,055
Latest member
DrPendragon