我在WPF(C#)中使用DataSet来填充DataGrid。结果如下:
我想要移除左侧的空白列,并希望剩余的空间分配给其他列。期望的结果是:
我的XAML代码是:
<Window x:Class="RFID.CareerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="CareerWindow" Height="356" Width="404">
<Grid>
<DataGrid x:Name="dg1" HorizontalAlignment="Left" Margin="25,10,0,0" VerticalAlignment="Top" Height="306" Width="355" EnableRowVirtualization="false" EnableColumnVirtualization="false" FontFamily="2 badr" FontSize="20" FlowDirection="RightToLeft" CanUserAddRows="False" CanUserReorderColumns="False"/>
</Grid>
</Window>