Take the 2-minute tour ×

I see a similar question here but following the answer there doesn't resolve this same issue. Images are still listed vertically. I am binding oData from NetFlix.

enter image description here

Following is the XAML :-

          <DataTemplate x:Key="ImageCell">
            <StackPanel Orientation="Horizontal">
                <Image Source="{Binding BoxArt.MediumUrl}" Width="200" Height="200" Stretch="Fill" ToolTip="{Binding Synopsis}"/>

 <ListView Margin="21,40,26,9" Name="lvwTitles" ItemsSource="{Binding}" 
 SelectionMode="Single" ItemTemplate="{StaticResource ImageCell}">        

Following is the code behind:-

List<Title> titles = serviceAccessor.GetAllTitlesByGenre(cmbGenre.SelectedValue.ToString());
lvwTitles.ItemsSource = titles;
share|improve this question
Check this link stackoverflow.com/questions/1041551/… Greetings –  Iori Yagami May 5 '12 at 1:06
I have already seen that link and used WrapPanel and images still don't show horizontally and I believe Its certainly possible with stackpanel. –  Ashish Gupta May 5 '12 at 1:09

1 Answer 1

up vote 4 down vote accepted

You are using the stackpanel in the wrong place. The stackpanel in the datatemplate just creates a stackpanel containing one single image, for each item in the listview. Try setting the itemspanel.. something like this:

            <StackPanel Orientation="Horizontal" />
share|improve this answer

Your Answer


