lundi 22 décembre 2014

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


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.


http://ift.tt/1CnPc3j


I try it this xaml code:



<ListBox Name="lstB" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Visible">
<ListBoxItem>
<VirtualizingStackPanel Orientation="Horizontal"/>
</ListBoxItem>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<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>


But It show the whole elements vertically scrollable, not only textblock.


There are some tipps anybody, how can I do it?


Thanks!





Aucun commentaire:

Enregistrer un commentaire