Hi,
Does anybody know how I can add a scroll bar to a wrappanel contained within an itemscontrol?
Hi,
Does anybody know how I can add a scroll bar to a wrappanel contained within an itemscontrol?
Wrap a ScrollViewer tag around it
<ScrollViewer>
<WrapPanel>
<!-- your other controls here -->
</WrapPanel>
</ScrollViewer>
That won't work here,
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<ScrollViewer>
<WrapPanel Orientation="Horizontal" />
</ScrollViewer>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
You get a nasty exception, VisualTree of ItemsPanelTemplate must contain a Panel. 'System.Windows.Controls.ScrollViewer' is not a Panel.