CanFreeze is returning false because a DependencyProperty on the Freezable has a value that is an expression

2 posts, 1 answers
  1. BENN
    BENN avatar
    62 posts
    Member since:
    Dec 2011

    Posted 28 Dec 2016 Link to this post

    I've recently upgraded my visual studio from 2010 to 2015, and since them, I'm getting a lot of warnings in my output window like:

    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.TranslateTransform'; Freezable.HashCode='10705061'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='1587067'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='4309168'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='59694858'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='1914083'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='19024873'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='50812954'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='4881566'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='18343908'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='20169503'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='35212414'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='41054801'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='35526744'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='55199627'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='955278'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='42987539'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='55391087'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'
    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.TranslateTransform'; Freezable.HashCode='9570975'; Freezable.Type='System.Windows.Media.TranslateTransform'; DP='X'; DpOwnerType='System.Windows.Media.TranslateTransform'

     

     

    It happens every time a value in the gridview is changed.

    It affects the performance of visual studio, since the output window is very busy. 

    Why it happens? It is something you are doing wrong and can be fixed?

    Can I disable these warnings somehow?

     

    Thanks.

  2. Answer
    Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1183 posts

    Posted 29 Dec 2016 Link to this post

    Hi,

    These warning messages should not be related to any new changes in our code. There is a setting in VisualStudio for that particular set of warnings. You can open Tools > Options > Debugging > Output Windows > WPF Trace Settings > Freezables and set the desired value.

    Regards,
    Ivan Ivanov
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top