I have a dockpanel that I dynamically fill using an ItemsControl to populate the panel. The dockpanel needs the last child from the itemscontrol list to fill the rest of the panel, but it doesn't seem to happen if I populate it in this fashion... what can I do to get that last item to expand?
snippet of how I have it set up: (note I set the dockpanel background to blue so I could distinguish the populated user controls from the background of the panel)
<DockPanel Background="Blue" LastChildFill="True" Margin="0">
<ItemsControl ItemsSource="{Binding Requirements}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:TMGrid2View Baseline="{Binding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</DockPanel>
My current hypothesis as to what is happening is the child-fill is being applied to the itemscontrol instead of the children populated within the itemscontrol. I've used setters in the past to specify the child should dock to a side of the panel for instance... but there doesn't seem to be a child setter option to get it to expand...