This question is locked. New answers and comments are not allowed.
in this sample http://localhost:6519/Default.aspx#Chart/SimpleFiltering,I want to get the control called checkbox1,but I cant get it with this.checkbox1,How to get the checkbox1??
<UserControl.Resources>
<example:ExampleViewModel x:Key="ViewModel" />
<Style x:Key="CustomLegendItemStyle" TargetType="charting:ChartLegendItem">
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="charting:ChartLegendItem">
<Grid x:Name="PART_MainContainer" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,0,5,0">
<Path x:Name="PART_LegendItemMarker"
Height="20"
Width="100"
Style="{TemplateBinding ItemStyle}"
Stretch="Fill">
<Path.Data>
<PathGeometry x:Name="PART_ItemMarkerGeometry" />
</Path.Data>
</Path>
<CheckBox IsChecked="True" x:Name="checkbox1"
VerticalAlignment="Center"
Margin="2,0"
Content="{TemplateBinding Label}"
Foreground="{TemplateBinding Foreground}"
Command="{Binding Path=ChangeSeriesVisibilityCommand, Source={StaticResource ViewModel}}"
CommandParameter="{TemplateBinding Label}"
/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<UserControl.Resources>
<example:ExampleViewModel x:Key="ViewModel" />
<Style x:Key="CustomLegendItemStyle" TargetType="charting:ChartLegendItem">
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="charting:ChartLegendItem">
<Grid x:Name="PART_MainContainer" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0,0,5,0">
<Path x:Name="PART_LegendItemMarker"
Height="20"
Width="100"
Style="{TemplateBinding ItemStyle}"
Stretch="Fill">
<Path.Data>
<PathGeometry x:Name="PART_ItemMarkerGeometry" />
</Path.Data>
</Path>
<CheckBox IsChecked="True" x:Name="checkbox1"
VerticalAlignment="Center"
Margin="2,0"
Content="{TemplateBinding Label}"
Foreground="{TemplateBinding Foreground}"
Command="{Binding Path=ChangeSeriesVisibilityCommand, Source={StaticResource ViewModel}}"
CommandParameter="{TemplateBinding Label}"
/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>