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

[Solved] Add Background Image to Gridview HeaderRow

1 Answer 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chad
Top achievements
Rank 1
Chad asked on 16 Aug 2011, 08:24 PM
Hi,

Everything about the Office-Blue theme works for us except the Color and gradient of the header. The color we'd need to match our existing application is very specific and unfortunately not a member of "windows.media.color". So as an alternative, I'd like to tile the header background with an image. How is this possible?

I've tried to play around with the themes project but can't figure out how to add an image.

Thanks,

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 16 Aug 2011, 09:19 PM
Hi Chad,

 
The styles used in our themes are theme specific. When you create a style targeted at any element it is applied against the default theme - Office_Black. The general approach in Silverlight to create a style targeted at any element you should follow the same pattern:


<Style TargetType="telerikGridViewHeaderRow" telerik:StyleManager.BasedOn="Telerik Theme Name">
<Setter Property="Background" Value="Red">
</Style>


Then the background of the GridViewHeaderRow will be red-coloured in the respective theme set within the BasedOn attribute. In a similar way you may use an ImageBrush element with the specified ImageSource, which represents the desired picture to paint the background of GridViewHeaderRow.


Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
GridView
Asked by
Chad
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or