wpf grid中的距离设置

1. Grid设置中的距离设置含义

A. Height =“Auto”  -->>根据行的内容来调整行的宽度;   B. Height = “*”-->>  将剩下的宽度进行权重等分; C. Height = “200” 像素宽度  D.  默认设置 不设定高度

2. DataTempelate 和ControlTemplate

DataTempelate: 是数据内容的表现,一条数据显示成什么样子;DataTempelate常用的地方有A.ContentControl的ContentTemplate属性;B.ItemsControl的ItemTemplate属性;C.GridViewColumn的CellTemplate属性。

ControlTemplate:如果控件的样式不能满足,可自定义控件模板来设计样式

猜你喜欢

转载自www.cnblogs.com/wpfstudy/p/12233338.html