获取控件值
<sdk:DataGridTemplateColumn Header="全选" CanUserResize="False" Width="44"> <sdk:DataGridTemplateColumn.HeaderStyle> <Style TargetType="sdk:DataGridColumnHeader"> <Setter Property="HorizontalContentAlignment" Value="Center"></Setter> <Setter Property="VerticalContentAlignment" Value="Center"></Setter> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <TextBlock Text="" Width="12"/> <CheckBox Name="chkAll" Checked="chkAll_Checked" Unchecked="chkAll_Unchecked" /> </StackPanel> </DataTemplate> </Setter.Value> </Setter> </Style> </sdk:DataGridTemplateColumn.HeaderStyle> <sdk:DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> <CheckBox HorizontalAlignment="Center" Name="CheckBoxOSId" Tag="{Binding}"></CheckBox> </StackPanel> </DataTemplate> </sdk:DataGridTemplateColumn.CellTemplate> </sdk:DataGridTemplateColumn>