<DataGrid x:Name="DataGrd_FeelerPin_List" ItemsSource="{Binding GridModelList}"
AutoGenerateColumns="False"
CanUserAddRows="False"
SelectionUnit="Cell"
EnableRowVirtualization="True"
GridLinesVisibility="All"
CanUserResizeColumns="False"
CanUserResizeRows="False"
ColumnHeaderHeight="30">
<DataGrid.Columns>
<DataGridTextColumn Header="序号"
Binding="{Binding ID}"
CanUserReorder="False"
IsReadOnly="True" Width="35"
TextBlock.TextAlignment="Center"/>
<DataGridTextColumn Header="HF"
Binding="{Binding HF}"
CanUserReorder="False"
IsReadOnly="False" Width="*"
TextBlock.TextAlignment="Center"/>
<DataGridTextColumn Header="HS"
Binding="{Binding HS}"
CanUserReorder="False"
IsReadOnly="True" Width="*"
TextBlock.TextAlignment="Center"/>
<DataGridTextColumn Header="LF"
Binding="{Binding LF}"
CanUserReorder="False"
IsReadOnly="False" Width="*"
TextBlock.TextAlignment="Center"/>
<DataGridTextColumn Header="LS"
Binding="{Binding LS}"
CanUserReorder="False"
IsReadOnly="False" Width="*"
TextBlock.TextAlignment="Center"/>
</DataGrid.Columns>
</DataGrid>
自动产生行
AutoGenerateColumns=“False”
让用户添加列
CanUserAddRows=“False”
选中时是单元格
SelectionUnit=“Cell”
使用行虚拟化,节省资源,实时创对和销毁行对UI对象
EnableRowVirtualization=“True”
显示网格线类型:全部、横线、竖线、无线
GridLinesVisibility=“All”
用户调整行宽度
CanUserResizeColumns=“False”
用户调整列宽度
CanUserResizeRows=“False”
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/51766.html