WpfBindingErrors icon indicating copy to clipboard operation
WpfBindingErrors copied to clipboard

Freezable warnings in Debug Output

Open Bernhard-Hiller opened this issue 6 years ago • 3 comments

After I added "BindingExceptionThrower.Attach();" in my code, I receive an enormous load of warnings in the Debug Output window of Visual Studio 2015: "System.Windows.Freezable Warning: 1 : CanFreeze is returning false because a DependencyProperty on the Freezable has a value that is an expression; Freezable='System.Windows.Media.RotateTransform'; Freezable.HashCode='31654880'; Freezable.Type='System.Windows.Media.RotateTransform'; DP='Angle'; DpOwnerType='System.Windows.Media.RotateTransform'" There are several "HashCode" values involved. I can get rid of them by commenting the "BindingExceptionThrower.Attach();" line out.

Bernhard-Hiller avatar Aug 03 '17 11:08 Bernhard-Hiller

I can build without any warning. Does anyone else have this problem?

bblanchon avatar Oct 02 '19 13:10 bblanchon

Hi. I also have this warning in my output. Before I had : System.Windows.Data Warning: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.ItemsControl', AncestorLevel='1''. BindingExpression:Path=HorizontalContentAlignment; DataItem=null; target element is 'ListBoxItem' (Name=''); target property is 'HorizontalContentAlignment' (type 'HorizontalAlignment')

Now it prints out Freezable Warning. I'm not sure which one is the worst 😄

sekulicb avatar Apr 23 '20 23:04 sekulicb

Same here (.net core 3.1, WpfBindingErrors 1.1.0):

System.Windows.Freezable Warning: 1 : CanFreeze is returning false because a DependencyProperty on the Freezable has a value that is an expression
System.Windows.Freezable Warning: 3 : CanFreeze is returning false because a DependencyProperty on the Freezable has a value that is a Freezable that has also returned false from CanFreeze

Maybe it's somehow related to DataGrid and it's virtualization.

LevYas avatar Aug 11 '20 14:08 LevYas