对于WPF数据网格我在xaml文件中使用以下代码行。我已将datagrid中列的resize属性设置为true。它仍然没有在datagrid的列上显示拆分器图标。
<WPFToolkit:DataGrid CanUserAddRows="False" Background="GhostWhite"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
MouseDoubleClick="gridSearchClinet_MouseDoubleClick"
CanUserResizeColumns="True" CanUserReorderColumns="False"
Sorting="gridSearchClinet_Sorting" CanUserResizeRows="False"
ItemsSource="{Binding}" IsReadOnly="True"
CanUserSortColumns="True" CanUserDeleteRows="False"
x:Name="gridSearchClinet" AutoGenerateColumns="False"
Margin="10,65,11,50">
<WPFToolkit:DataGrid.RowStyle>
<Style TargetType="{x:Type WPFToolkit:DataGridRow}">
<Style.Triggers>
<Trigger Property="WPFToolkit:DataGridCell.IsSelected" Value="True">
<Setter Property="Background" Value="LightBlue" />
<Setter Property="Foreground" Value="Black" />
</Trigger>
</Style.Triggers>
</Style>
</WPFToolkit:DataGrid.RowStyle>
<WPFToolkit:DataGrid.Columns>
<WPFToolkit:DataGridTextColumn Header="Division" Width="70"
CanUserResize="True" CanUserReorder="False"
CanUserSort="True" Binding="{Binding Spart}" />
<WPFToolkit:DataGridTemplateColumn Header="Description" CanUserResize="True"
Width="325" CanUserSort="True"
CanUserReorder="False"
SortMemberPath="Description">
<WPFToolkit:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Label HorizontalAlignment="Left" Width="1000"
VerticalAlignment="Center" BorderThickness="0"
Content="{Binding Path=Description}" FontSize="9"
ToolTip="{Binding Path=Description}" />
</DataTemplate>
</WPFToolkit:DataGridTemplateColumn.CellTemplate>
</WPFToolkit:DataGridTemplateColumn>
<WPFToolkit:DataGridTextColumn Header="PG" Width="50" CanUserResize="True"
CanUserReorder="False" CanUserSort="True"
Binding="{Binding Konda}" />
<WPFToolkit:DataGridTextColumn Header="BCC" Width="50" CanUserResize="True"
CanUserReorder="False" CanUserSort="True"
Binding="{Binding IhKomp}" />
<WPFToolkit:DataGridTemplateColumn Header="Booking Unit" CanUserResize="True"
Width="735" CanUserSort="True"
SortMemberPath="Beinh">
<WPFToolkit:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Label HorizontalAlignment="Left" Width="1000"
VerticalAlignment="Center" BorderThickness="0"
Content="{Binding Path=Beinh}" FontSize="9"
ToolTip="{Binding Path=Beinh}" />
</DataTemplate>
</WPFToolkit:DataGridTemplateColumn.CellTemplate>
</WPFToolkit:DataGridTemplateColumn>
</WPFToolkit:DataGrid.Columns>
</WPFToolkit:DataGrid>
非常感谢任何帮助。