读书人

求silverlight里面怎么去设置grid高度

发布时间: 2012-05-24 11:55:41 作者: rapoo

求silverlight里面如何去设置grid高度?
<RowDefinition x:Name="newbar" Height="30"></RowDefinition>

我想在.CS文件里面设置高度为0,或者不显示 怎么写呀 newbar.Height = 120;是报错的

[解决办法]
this.LayoutRoot.ColumnDefinitions[0].Width = new GridLength(220);
LayoutRoot是grid的name,列是这么改宽度,行没试过,你可以试试
this.LayoutRoot.RowDefinitions[0].Height= ...
[解决办法]
this.LayoutRoot.RowDefinitions[0].Height = new GridLength(220);
应该是这样 试试吧

读书人网 >CAD教程

热点推荐