Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GridUnitType.Star?

Tags:

c#

wpf

How does this star unit type works? I have read msdn definition. But could not really get how it defines the size of an object.

like image 322
user3693 Avatar asked Nov 01 '12 19:11

user3693


1 Answers

The * sizes automatically adjust sizes proportionally. So, for example if you have a column with a width of * and another with a width of * then those two columns will have the same width (if they were the only two columns, that with would be 50% of the width of the grid).

If instead, one column was 2* and the other * then the ratio of the widths of the columns will be 2:1. In other words, the first column will be 66% and the other would be 33%

If it was 4* and 6*, then the first column would be 40% and the second 60%. You could equally well write that at 2* and 3* because it's the ratio that's important, not the absolute numbers.

like image 82
Matt Burland Avatar answered Oct 23 '22 04:10

Matt Burland