Reputation: 543
I have 3 grids on the same row on a grid. Is there a way to stretch just the middle grid but not the other two upon resizing? All I could do right now is to stretch the last one. I have tried to set the middle grid's horizontalAlignment to stretch but then it stretches all the way and even overlapped the last grid without the program running. Still don't quite understand why....
Upvotes: 0
Views: 105
Reputation: 184516
Not sure if i understood your layout/plan, but you should be able to do this with the Row/Column in the middle haivng star size.
e.g.
<Grid>
<Grid.ColumnDefintions>
<ColumnDefintion Width="Auto"/>
<ColumnDefintion Width="*"/>
<ColumnDefintion Width="Auto"/>
</Grid.ColumnDefintions>
<Grid Grid.Column="0">...</Grid>
<Grid Grid.Column="1">...</Grid> <!-- Middle will stretch -->
<Grid Grid.Column="2">...</Grid>
</Grid>
Upvotes: 3