indows phone 8正常的绑定图片只显示一列(即上下一列显示),怎样把显示的图片由一列变成一行(左右一行)显示呢?求大神帮助???
<Grid Grid.Row="1" Name="advertGrid">
<ListBox Name="advertListBox">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Image Name="imgAdvertisement" Source="{Binding AdPic}" Stretch="Fill" Height="112" ></Image>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid> 楼主真是大手笔,我就不客气了
把这个加到listbox里面,把宽度设宽点看看效果
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
[解决办法]
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
再加上绑定代码