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>
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>