MultiBinding in a TreeView Collapses TreeViewItems when One of the Bindings value changed?

Your setup looks like something in which a CompositeCollection might help, it should prevent the complete recreation of the ItemsSource even if you change a part.

Up vote 0 down vote favorite share g+ share fb share tw.

I have a TreeView thats binding to an Object of Type View with an attribute Name and two Lists. When I add Elements in one of the expanded Lists it stays expanded and thats what I want . The Problem is when I change The Name of View1 all the Multibinging Bindings are refreshed and all expanded Lists if any in the View1 collapses, but the View1 is still expanded .

Is there any Way to avoid this behaviour so that when the value of the Name changes the converter somehow only changes the changed Value without collasing other Bindings . Thank you ` wpf xaml data-binding treeview multibinding link|improve this question edited Sep 29 '11 at 0:02 asked Aug 5 '11 at 14:37Mohamed Cherif605 100% accept rate.

– AngelWPF Aug 5 '11 at 15:40 I want the name to be binded in the treeview as the first treeviewitem along with other lists . I thought MultiBinding was the best Solution for such multiple Bindings. Or am I missing something – Mohamed Cherif Aug 6 '11 at 1:10.

I modified the converter so it returns CompositeCollection but nothing changed! When I change the Name the Converter is called again and a new composite collection is being generated . I should mention that I am not combining List1 and List2 together in one List .

I have a 3 Level TreeView where the 2nd Level has 3 TreeViewItems(which are Name and A and B) and when you expand A you get to see List1 . – Mohamed Cherif Aug 6 '11 at 0:46 @MohamedCheri: You are not supposed to use a MultiBinding with converter, replace the whole thing with the CompositeCollection. You may use some converter inside collection containers if you must but using one converter to create a complex list is never a good idea – H.B. Aug 6 '11 at 1:22.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions