问题描述
怎么去掉datagrid后面多余的行线的datagrid的XML如下:<DataGridName="DGGoods"DockPanel.Dock="Top"AutoGenerateColumns="False"><DataGrid.ColumnHeaderStyle><StyleTargetType="DataGridColumnHeader"><SetterProperty="HorizontalContentAlignment"Value="Center"></Setter></Style></DataGrid.ColumnHeaderStyle><DataGrid.Columns><DataGridTextColumnHeader="商品名称"Binding="{BindingName}"></DataGridTextColumn><DataGridTextColumnHeader="商品价格"Binding="{BindingPrice}"></DataGridTextColumn><DataGridTextColumnHeader="商品单位"Binding="{BindingUnit}"></DataGridTextColumn><DataGridTextColumnHeader="供货商名称"Binding="{BindingCompany}"></DataGridTextColumn></DataGrid.Columns></DataGrid>
解决方案
解决方案二:
每一个DataGridTextColumn都加宽度,Width=“*”
时间: 2024-11-20 14:22:43