Hide/unhide lines with checkboxes in legend

Aug 9, 2012 at 3:38 AM

Hi:

I am trying to recreate the example called "Line Graph legend" under Miscellanous in the following link, http://research.microsoft.com/en-us/um/cambridge/projects/ddd/d3isdk/

 

I am using WPF not silverligth, and was having problems getting the references for the following XAML portion.

 

 <d3:Chart.LegendContent>
                <d3:LegendItemsPanel>
                    <d3:LegendItemsPanel.Resources>
                        <DataTemplate x:Key="Microsoft.Research.DynamicDataDisplay.LineGraph">
                            <StackPanel Orientation="Horizontal">
                                <CheckBox IsChecked="{Binding Path=Visibility, Converter={StaticResource VisibilityToCheckedConverter}, Mode=TwoWay}"/>
                                <Line Width="15" Height="15" X1="0" Y1="0" X2="15" Y2="15" Stroke="{Binding Path=Stroke}" StrokeThickness="2"/>
                                <TextBlock Margin="5,0,0,0" Text="{Binding Path=Description}"/>
                            </StackPanel>
                        </DataTemplate>
                    </d3:LegendItemsPanel.Resources>
                </d3:LegendItemsPanel>
            </d3:Chart.LegendContent>


Thanks