tags:

views:

583

answers:

1

Hey,

Quick question, how do I convert this into back end code? i.e. c#

ItemsSource="{Binding Source={StaticResource List1}, XPath=Entry}"

Thanks

+5  A: 
Binding items = new Binding();
items.Source = FindResource("List1");
items.XPath = "Entry";
myItemsControl.SetBinding(ItemsControl.ItemsSourceProperty, items);

Where myItemsControl is the control on which to set ItemsSource.

Josh G
I presume that the Entry element/node is going to contain a collection of children?
Josh G