Quantcast
Viewing all articles
Browse latest Browse all 18858

ExpanderList not working within an unselected TabItem

Hi all,

I implemented an ExpanderList and it seems to work quite well, unless I put it into a TabControl.

Only if it is embedded into the TabItem which is selected by default, it is working. If it is placed to a TabItem which is not selected on startup, all Expanders can be opened simultaneously and I see the following error in the Output window (Only one error below, but I recieve it of course for all expander objects):

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ListBoxItem', AncestorLevel='1''. BindingExpression:Path=IsSelected; DataItem=null; target element is 'Expander' (Name='myExpanderControl-01'); target property is 'IsExpanded' (type 'Boolean')

Maybe this is related to virtualization of the TabControl, but I already switched it off with no success.

Anyone having an idea how to get this work within a TabControl?


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>