12

Closed

Changing TabControl tabs causing TreeView.SelectionItemChanged event to fire on every node

description

Bug Description:
When you insert a TreeView control under a TabControl, then select a TreeViewItem, then the TreeView.SelectionItemChanged event fires on every node below the node that’s being selected.
 
Repro Steps:
(1) Build and run the repro app
(2) Click “1” in the TreeView control  This will cause SelectionChanged even to fire, which then adds the text “1” to the TextBox to the right.
(3) Press “Two” to go to the second tab in the TabControl  Doing this should not trigger any SelectionChanged event to fire on TreeView.
Result:
    “2” and “3” are both added to the TextBox due to SelectionChanged event was fired on all them.
    (You can set a breakpoint at line38 in Page.xaml.cs file inside the SelectionItemChanged event handler to see this happening)

file attachments

Closed Aug 11, 2012 at 1:00 AM by RohanTha
Bulk closing issues older than 2 years. Please reactivate if you still have this problem.

comments

eddieli wrote Dec 8, 2008 at 10:41 PM

This issue was originally posted on http://www.vitarn.com/155.htm

JohnyIversen wrote Apr 28, 2009 at 2:40 PM

We have problems with changing tabs as well, but for some reason, it only occurs when a subitem is selected, and it only moves to the next sibling of the parent of the selected item.

It really is an annoying bug, that in some parts of our application have tremendous impact, because this bug moves employees from one department to another in a company structure setup, which of course is very critical.

One thing we did notice however, is that the error only occured when the TreeView was in focus while changing tabs.

NB: I've downloaded the sample, and I could not make it work to begin with, because it was an older version of the Silverlight Toolkit, but I've changed that, and uploaded a functioning version to this comment.

shawnoster wrote Jun 2, 2009 at 8:44 PM

This issue has been fixed and will be available with the next release of the Silverlight Toolkit.