In WPF, a StackPanel
does not work like a Grid
. There is no maximum width... it will happily let content disappear out of its right side. If you want automatic resizing, just replace the StackPanel
s with `Grid
UPDATE >>>
In the Grid
class, there is an attached property called IsSharedSizeScope
. Add this to the parent Grid
and set it to true. Then in your RowDefinitions
, you can add SharedSizeGroup
properties to the columns that you require.
These examples may help you:
Grid's SharedSizeGroup and * sizing (SO post)
Grid.IsSharedSizeScope Attached Property (MSDN)
You may need to experiment a bit, but you should be able to get the desired effect using these properties.