[英]How many pixel from 1 star (GridUnitType.Star) in WPF
I found here 我在这里找到
var gridLength = new GridLength(1, GridUnitType.Star);
I want to know, 1 star = ? 我想知道,1星=吗? pixel
像素点
I was reached on the Internet, but I couldn't found any threads about this 我已通过Internet与我联系,但找不到与此相关的任何线索
Thanks. 谢谢。
Star is relative unit, similar to % in css, but slightly different 星号是相对单位,与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*" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.