Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1770
Event when data binding is finished
posted

Every time the itemsource property for my xamdatatree gets new data I would like to default the first node to IsChecked = true. I can do it like this when then tree first loads:

ItemsSource="{Binding OutageTypes, Mode=TwoWay}"
DisplayMemberPath="OutageTypeDesc"
NodeCheckedChanged="OutageTypeTree_OnNodeCheckedChanged"
Loaded="OutageTypeTree_OnLoaded">








private void OutageTypeTree_OnLoaded(object sender, RoutedEventArgs e)
{
OutageTypeTree.Nodes[0].IsChecked = true;
}

But I can't seem to find an event that fires after I change the dataset in OutageTypes to something else based on a selection the user makes in the UI. In the new dataset in object OutageTypes I have a property called IsChecked but defaulting it to true does not affect the tree.

How can I accomplish this?