Hi,
I have the following kind of line in my code:
InTree.ScrollNodeIntoView(foundnode)
InTree is XamDataTree in my form XAML and foundnode is the node I want to scroll into view. How to handle this exception? The complete exception looks like this:
"
An exception of type 'System.ArgumentNullException' occurred in PresentationFramework.dll but was not handled in user code
Additional information: Value cannot be null.
I have made sure that InTree and foundNode are both not null.
I get similar kind of exception in OnPropertyChanged event when I uncheck or collapse a node. So I have to use empty Try Catch block in my Class Property IsSelected and IsExpanded. What is the work around for this?
Thanks
Hi Mohni,
How are you getting the reference for the node(s) to be expanded? Do you have a sample app/code that I can take a look at to see what’s going on?
Also, the exception details that you pasted into your post appear to be missing, it may be helpful to include them in your next post.
Warm regards,
Chris K.
Hi Chris,
I am not able to reproduce these errors. They are intermittent and I have not been able to find the exact scenario when I got that error. As for the IsExpanded and IsChecked properties of the object bound to the node, I get them every time I uncheck or collapse a tree node i.e. if the value of these is False or Nothing. If the value passed o the setter is True, I don't get the exception.
Thanks,