我在wpf
工作,我使用下面的DataGrid:多選在數據網格禁用WPF
<DataGrid Name="dgUseCaseList" AutoGenerateColumns="False" Grid.Row="0" CanUserAddRows="False" VirtualizingStackPanel.IsVirtualizing="False" Height="620" VerticalAlignment="Top" SelectionMode="Single" >
<DataGrid.Columns>
<DataGridTemplateColumn Width="30">
<DataGridTemplateColumn.Header>
<CheckBox Name="chkSelectAllUseCases" Click="chkSelectAllUseCases_Click" IsHitTestVisible="False"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox Name="chkSelectUseCase" IsChecked="{Binding Path=IsSelected,Mode=TwoWay}" Click="chkSelectUseCase_Click"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Width="100" Header="UseCaseId" Binding="{Binding Path=UseCaseId}">
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="ToolTip" Value="{Binding UseCaseDescription}" />
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
但還是我能選擇多的複選框。如何禁用此功能。 (我想只選擇一個複選框,在選擇下一個複選框時,前一個應該被取消選中)