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

Changing background of RadTreeListView header ?

2 Answers 190 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 06 Jun 2016, 05:54 PM

Hi,

 

I'm trying to change the HEADER background but my only success left the control inoperable - the sorting and filtering did not work.

I need the *HEADER ROW* background to be this gradient:

        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF25578A" Offset="0" />
                    <GradientStop Color="#FF25578A" Offset="1" />
                    <GradientStop Color="#FF25579A" Offset="0.42" />
                    <GradientStop Color="#FF003F87" Offset="0.43" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>

..any help would be appreciated.

Barry

 

 

2 Answers, 1 is accepted

Sort by
0
Barry
Top achievements
Rank 1
answered on 06 Jun 2016, 08:29 PM

Seems the answer was:

...

                <telerik:RadTreeListView.Columns>
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" HeaderCellStyle="{StaticResource MyCellStyle}" Header="{x:Static Title}" Width="200" />
                </telerik:RadTreeListView.Columns>
            </telerik:RadTreeListView>

 

..and then tinker with the Style as extracted from Blend for the same control.

0
Dilyan Traykov
Telerik team
answered on 09 Jun 2016, 07:39 AM
Hello Barry,

As you've correctly guessed, to customize the appearance of the RadGridView's header cells you should define an appropriate style targeting the GridViewHeaderCell element and set it as the HeaderCellStyle for the respective columns. If you want to set the same style for all your columns, you may want to make the style implicit.

Additionally, you can style the entire header row, by styling the GridViewHeaderRow element. RadGridView exposes a HeaderRowStyle property which you can use for this purpose.

I hope you find this information helpful.

Regards,
Dilyan Traykov
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
TreeListView
Asked by
Barry
Top achievements
Rank 1
Answers by
Barry
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or