1
我想在列表框中显示多列。我已经提到以下链接Using WrapPanel and ScrollViewer to give a multi-column Listbox in WPF。带多列的列表框wpf
问题:
我想使用重复按钮滚动内容。如何控制使用按钮的列表框滚动条。
代码:
<ListBox Name="lbTrack" ScrollViewer.VerticalScrollBarVisibility="Disabled" ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock FontSize="14" Margin="10" Text="{Binding TrackName}" /> </StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True" Orientation="Vertical"></WrapPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>