April 11, 2014 Leave a comment
Recall that a GridSplitter in its own column and with its HorizontalAlignment set to Center will resize columns on either side of it. In the example below, columns 0 and 2 are resized, but the width of column 3 is not changed.
If all of the content columns are sized using star sizing, the GridSplitter will leave them as star sized, but change the coefficients to match the final size after moving the GridSplitter. We can see this by dumping out the column widths before and after our sizing operation.
Before resizing, columns 0, 2 and 3 are all “1*” (or just “*”). They take up equal space.
After resizing, the coefficients change. Columns are still proportionally sized, but the proportions are different.
We can verify that the columns are sized proportionally by resizing the entire Grid (containing window). The columns retain their post-GridSplitter relative sizes.