<XmlDataProvider x:Key="SalesInfo" Source="D:\WPF\SalesStats.xml" XPath="/SalesFigures"></XmlDataProvider> <HierarchicalDataTemplate x:Key="CheckBoxItemTemplate" DataType="SalesPerson" ItemsSource ="{Binding}"> <StackPanel Orientation="Horizontal"> <CheckBox IsChecked="False" ></CheckBox> <TextBlock Text="{Binding XPath=@Name}" /> </StackPanel> </HierarchicalDataTemplate>
<TreeViewItem ItemsSource="{Binding Source={StaticResource SalesInfo}, XPath=*}" Header="SalesFigures" ItemTemplate="{StaticResource CheckBoxItemTemplate}"> </TreeViewItem>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)