Tolong, seseorang bantu saya.
Saya mengatur WrapPanel di ListBox ItemsPanelTemplate. Juga, saya sudah mengatur ScrollViewer.CanContentScroll="True"
.
Tetapi mengapa item listbox tidak bergulir ke atas/bawah berdasarkan ITEM satu per satu? Gaya gulir masih menggunakan PIXEL.
Ada yang bisa bantu saya?
<Grid>
<ListBox x:Name="testListbox" ScrollViewer.CanContentScroll="True">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Width="200" ScrollViewer.CanContentScroll="True"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
<ListBoxItem Background="LimeGreen" BorderBrush="Black" BorderThickness="3" ScrollViewer.CanContentScroll="True">
<Image Height="50" Width="80" ScrollViewer.CanContentScroll="True"/>
</ListBoxItem>
</ListBox>
</Grid>