0

ここで見つけました

var gridLength = new GridLength(1, GridUnitType.Star);

知りたい 星1つ=?ピクセル

インターネットで連絡がありましたが、これに関するスレッドは見つかりませんでした

ありがとう。

4

1 に答える 1

1

スターは相対的な単位で、css の % に似ていますが、少し異なります

//will split the grid into two columns with equal width
<ColumnDefinition Width="1*" /> //the same as Width="*"
<ColumnDefinition Width="1*" />


//will split the grid into two columns with ratio 1:2 
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="2*" />

//will split the grid into two columns, first 50px (fixed), second the rest of the grid
<ColumnDefinition Width="50" />
<ColumnDefinition Width="*" />

//will split the grid into three columns, first 50px, and the rest of the grid splitted with ratio 2:2, which is the same as 1:1
<ColumnDefinition Width="50" /> 
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="2*" />
于 2016-06-06T11:30:37.987 に答える