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