<DataGridTemplateColumn Width="50" Header="选择">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ContentControl>
<ContentControl.Style>
<Style TargetType="ContentControl">
<Style.Triggers>
<!-- 单标签 -->
<DataTrigger Binding="{Binding DataContext.Model.LabelType, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" Value="6">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<RadioButton HorizontalAlignment="Center" GroupName="List" IsChecked="{Binding DataContext.IsChecked, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}" />
</DataTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
<!-- 多标签 -->
<DataTrigger Binding="{Binding DataContext.Model.LabelType, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" Value="7">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<!--<CheckBox IsChecked="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" />-->
<CheckBox HorizontalAlignment="Center" IsChecked="{Binding DataContext.IsChecked, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}" />
</DataTemplate>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
</ContentControl>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>