您的位置:首页 > Web前端 > CSS

silverlight - datagrid样式多表头后,拉伸后表格的表格线不跟着变化

2015-01-27 14:26 357 查看
在前台设置CanUserResize属性,可以控制当前列不可拉伸状态

如下代码:

<sdk:DataGridTemplateColumn x:Name="cl1" HeaderStyle="{StaticResource TBIStyle}" CanUserResize="False">

<sdk:DataGridTemplateColumn.CellTemplate>

<DataTemplate>

<StackPanel Orientation="Horizontal">

<TextBlock Text="{Binding [totalStorage]}" Width="50" />

<Rectangle Fill="#ccc" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="1" />

<TextBlock Text="{Binding [addArea]}" Width="80"/>

<Rectangle Fill="#ccc" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="1" />

<TextBlock Text="{Binding [addXuBian]}" Width="80"/>

<Rectangle Fill="#ccc" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="1" />

<TextBlock Text="{Binding [downArea]}" Width="80"/>

<Rectangle Fill="#ccc" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="1" />

<TextBlock Text="{Binding [downXuBian]}" Width="80"/>

</StackPanel>

</DataTemplate>

</sdk:DataGridTemplateColumn.CellTemplate>

</sdk:DataGridTemplateColumn>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: