刚开始学习 c# 和 windows phone,我的问题我似乎无法让我的图像(绑定图像)显示并水平滚动,如果我在 xaml 中硬编码,我可以让它们工作,这是我的代码.. .
<!-- row 4 start -->
<Grid x:Name="row3" Grid.Row="3">
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<StackPanel x:Name="imgStackPanel" Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Auto">
<!--<Image Source="{Binding Path=DvdPhoto}" 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"/>
<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"/>
</StackPanel>
</ScrollViewer>
</Grid>
这工作图像显示,我可以从左到右滚动,我有图像绑定的注释掉的代码不起作用。
如果我做垂直它会很好,因为我有一个列表框,我已经尝试过水平的列表框。
有没有人有这个问题的解决方案。
提前致谢
格曼
PS:放轻松,正如我所说,我刚刚开始学习windows phone。:)