Binding Warning Fills my output window with messages

Grids for WPF Forum

Posted 12 years ago by jeff jarrell
Version: 11.2.0554
Avatar

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 12 years ago]

Comments (2)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jeff,

Unfortunately, this is really a timing issue in WPF and isn't really something that is wrong with our code. We have been able to correct some of these warnings in the past through trial and error, but there's no good way to "fix" them.


Actipro Software Support

Posted 12 years ago by jeff jarrell
Avatar

Good news. The latest update fixed this.  :)

Version 11.2.554.0

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.