This is a migrated thread and some comments may be shown as answers.

RadGridView background brush does not update

1 Answer 69 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ianr
Top achievements
Rank 1
ianr asked on 04 Mar 2013, 12:28 PM
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}"/>

1 Answer, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 07 Mar 2013, 02:00 PM
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.

Tags
GridView
Asked by
ianr
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or