RadGridView background brush does not update

2 posts, 0 answers
  1. ianr
    ianr avatar
    14 posts
    Member since:
    Mar 2010

    Posted 04 Mar 2013 Link to this post

    Hi,

    We are using the 2011.1.315.40 version of the WPF libraries.

    We have a custom style defined for the RadGridView, and for the background color, we are using a defined brush in another resource dictionary (set as a dynamic resource).  From the RadGridView style:

    <Setter x:Uid="Setter_302" Property="Background" Value="{DynamicResource TestListBackgroundBrush}"/>
    

    ListBackgroundBrush is defined in two resource dictionaries, with two different values - one for each theme offered by the application.  When changing theme, we unload one resource dictionary and load the other.

    However, for any RadGridView controls that have already been displayed, the background color does not change.  Checking the resources loaded shows that the value with that key has indeed changed - it is just that the RadGridView does not update.

    This is strange as the RowStyle for the grid view also has its background set to use this brush (also DynamicResource) and that color does change correctly.

    Can you please suggest what could be happening here.  It is not an option for use to upgrade to a more recent version of the library.

    Thanks.


    <Setter x:Uid="Setter_302" Property="Background" Value="{DynamicResource ListBackgroundBrush}"/>
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1216 posts

    Posted 07 Mar 2013 Link to this post

    Hi,

    Can you please try the approach illustrated in the attached project? It is tested with the version that you have mentioned.

    Kind regards,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top