[英]How many pixel from 1 star (GridUnitType.Star) in WPF
我在這里找到
var gridLength = new GridLength(1, GridUnitType.Star);
我想知道,1星=嗎? 像素點
我已通過Internet與我聯系,但找不到與此相關的任何線索
謝謝。
星號是相對單位,與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.