I have an ItemsControl, with its ItemsSource bound to a list of items. The size of each of the items is as small as they can be, what I need is for the control and the items
I think this ought to work, depending on what contains the outermost Grid
.
By default, a Grid will stretch to fill its container, and it'll cause its contents to stretch to fill itself. If you're putting the ItemsControl
in a DockPanel
and setting DockPanel.Dock="Bottom"
on the ItemsControl
, it'll fill the bottom of the DockPanel
, so if I understand correctly, that's not what you want.
Grid
is kind of the Swiss Army boat anchor of XAML layout. Throw 'em around everywhere.
If you want to dock other stuff in a DockPanel
, here's a simple DockPanel
layout: