求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);
应该是这样 试试吧