[WP7] Horizontal ListBox



리스트박스 가로로 보여주기 

 

<ListBox Height="150" Width="480"  ItemsSource="{Binding}" HorizontalAlignment="Left"

ScrollViewer.HorizontalScrollBarVisibility="Auto" 

         ScrollViewer.VerticalScrollBarVisibility="Disabled">

    <ListBox.ItemsPanel>

<ItemsPanelTemplate>

   <StackPanel Orientation="Horizontal" />

</ItemsPanelTemplate>

    </ListBox.ItemsPanel>


    <ListBox.ItemTemplate>

<DataTemplate>

   <Grid Height="150" Width="150" VerticalAlignment="Center" HorizontalAlignment="Center">

<Image Source="{Binding img}" Height="140" Width="140" Stretch="UniformToFill" />

   </Grid>

</DataTemplate>

    </ListBox.ItemTemplate>

</ListBox>