본문 바로가기
삽질/WP7.C#

[WP7] Horizontal ListBox

by 푸딩s 2013. 8. 9.
728x90
반응형



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

 

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



728x90
반응형

댓글