<ListBox Margin="238,205,248,0" Name="listBox1" Height="58" VerticalAlignment="Top" ScrollViewer.CanContentScroll="False">
            <ListBox.ItemsPanel>               
                <ItemsPanelTemplate>                   
                    <VirtualizingStackPanel Orientation="Horizontal"></VirtualizingStackPanel>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
            <ListBoxItem>这是1哈哈哈哈...........</ListBoxItem>
            <ListBoxItem>这是二哈哈哈哈...........</ListBoxItem>
            <ListBoxItem>这是三哈哈哈哈...........</ListBoxItem>
        </ListBox>

 

CanContentScroll=“False" 表示平滑滚动,如果为True,则为按项滚动。


本文转载:CSDN博客