
I want to clean up some of the binding warnings filling up my output window. I only show two, but I pretty much get these two per row in the property grid.
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='ActiproSoftware.Windows.Controls.PropertyGrid.TreeListViewItem', AncestorLevel='1''. BindingExpression:Path=IsExpanded; DataItem=null; target element is 'TreeListViewToggleButton' (Name=''); target property is 'IsChecked' (type 'Nullable`1')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='ActiproSoftware.Windows.Controls.PropertyGrid.TreeListViewItem', AncestorLevel='1''. BindingExpression:Path=HasItems; DataItem=null; target element is 'TreeListViewToggleButton' (Name=''); target property is 'NoTarget' (type 'Object')
Things do work, but I need the output window to see other things (like other binding warnings). We use a Custom Data Factories, our own IDataAccessors, many editors and use data templates in the names (probably part of the issue here) and have implicit styles for category expansion.
I don't know if this is helpful or not, but I'll describe the visual tree a bit.
Using snoop, for a PropertyName, as I move up the visual tree, TextBlock, ContentPresenter, Border. The Border at this level is a sibling to the TreeListViewToggleButton. Up from there is DockPanel, Border, TreeListViewCell, PART_Header (TreeListViewCell).
I'm thinking the ancestor level is to restrictive, once we we started using name templates. I've got a screen cap I could send.
Thanks.
jeff
[Modified 13 years ago]