1. Gman_WP's Avatar
    Just starting learning c# and windows phone, My Question I can't seem to get my images (Binding images) to show up and scroll horizontal, I can get them working if I hard code in xaml, here is the code I have...

    [CODE]
    <ScrollViewer HorizontalScrollBarVisibility="Auto" Height="Auto" Width="400">

    <ListBox x:Name="lstBoxImgHor" ScrollViewer.HorizontalScrollBarVisibility="Auto"
    ScrollViewer.VerticalScrollBarVisibility="Disabled" Height="200" >
    <ListBox.ItemTemplate>
    <DataTemplate>
    <StackPanel Margin="5" x:Name="dvdStackPanelHor" Orientation="Horizontal">
    <Image Grid.Row="0" Grid.Column="1" x:Name="img1" Source="{Binding Path=DvdPhoto}"
    Width="150" Height="150" Margin="5"> </Image>
    </StackPanel>
    </DataTemplate>
    </ListBox.ItemTemplate>
    <ListBox.ItemsPanel>
    <ItemsPanelTemplate>
    <StackPanel Orientation="Horizontal"></StackPanel>
    </ItemsPanelTemplate>
    </ListBox.ItemsPanel>

    </ListBox>
    <!-- Commented out images that work if inserted in -->
    <!--<Image Source="/GmanDVDStore;component/Images/rain.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/snow.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/sun.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/wind.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/rain.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/snow.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/sun.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/wind.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/rain.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/snow.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/sun.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/wind.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/rain.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/snow.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/sun.jpg" Width="150" Height="150" Margin="5"/>
    <Image Source="/GmanDVDStore;component/Images/wind.jpg" Width="150" Height="150" Margin="5"/>-->


    </ScrollViewer>
    [/CODE]

    this works the images show up and I can scroll left to right, The commented out code where I have images binding does not work.

    If I do it vertical it will work fine because I have in a listbox, and I have tried the listbox horizontal.

    Does anyone have a solution to this problem.

    Thanks in advance

    Gman

    PS: go easy on me, as I said I am just starting to learn windows phone. :)
    02-27-2013 04:19 PM

Similar Threads

  1. Replies: 14
    Last Post: 11-15-2018, 11:34 AM
  2. So you want XBox Video on Windows Phone 8?
    By Edwincnelson in forum Windows Phone 8
    Replies: 6
    Last Post: 11-19-2012, 08:06 PM
  3. So when are you buying your Windows Phone 8?
    By X0LARIUM in forum Windows Phone 8
    Replies: 67
    Last Post: 09-05-2012, 11:34 PM
  4. Official: Nokia Lumia 900 not getting Windows Phone 8
    By saintforlife in forum Nokia Lumia 900
    Replies: 73
    Last Post: 06-29-2012, 03:28 PM
  5. Google image search not working on phone
    By godplaysdice83 in forum Windows Phone 7
    Replies: 2
    Last Post: 02-06-2012, 03:14 PM
LINK TO POST COPIED TO CLIPBOARD