The RadTreeViewItem.RootItem property used to return an item's highest ancestor node (as of version 2009.1103), but in the current version (2010.0309) it always returns a reference to itself. Does anyone else see this behavior?
Here's a very simple example:
<StackPanel> |
<telerikNavigation:RadTreeView x:Name="tree"/> |
<TextBlock x:Name="msg"/> |
</StackPanel> |
And the code behind:
private void Window_Loaded(object sender, RoutedEventArgs e) |
{ |
RadTreeViewItem item1 = new RadTreeViewItem() { Header = "item1" }; |
RadTreeViewItem item2 = new RadTreeViewItem() { Header = "item2" }; |
RadTreeViewItem item3 = new RadTreeViewItem() { Header = "item3" }; |
tree.Items.Add(item1); |
item1.Items.Add(item2); |
item2.Items.Add(item3); |
// item3.RootItem returns item1 in 2009.1103 version (CORRECT) |
// item3.RootItem returns item3 in 2010.0309 version (WRONG) |
msg.Text = "item3.RootItem is " + item3.RootItem.Header.ToString(); |
tree.ExpandAll(); // <-- This also doesn't seem to be working |
item1.ExpandAll(); // <-- Neither does this |
} |