[Solved] RadPageView - color items

2 Answers 13 Views
PageView
Radek
Top achievements
Rank 2
Bronze
Iron
Iron
Radek asked on 27 Apr 2026, 07:27 AM

Hello,
I’m working with a RadPageView in Strip view mode and I need to color each tab (page) individually. The coloring works, but I’m facing two issues:

1. Selected tab color – I want to change the tab’s color when it becomes selected. I tried handling this in SelectedPageChanging, but I’m unable to restore the previous color correctly.

2. Font color – I need to adjust the text color based on the tab’s background (white text for dark tabs, black text for light tabs).

Is this possible to achieve?
Thank you for your help.

Radek

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 27 Apr 2026, 10:50 AM

Hi Radek,

Thank you for reaching out regarding tab coloring in RadPageView with Strip view mode.

Both scenarios you described are fully achievable. You need to target the Item property of each page element. You can modify the selected page in the SelectedPageChanging event. Inside the event handler, you can reset the properties of the previously selected page and customize the newly selected one.

public Form3()
{
    InitializeComponent();
    this.radPageView1.SelectedPageChanging += RadPageView1_SelectedPageChanging;
    this.radPageView1.SelectedPage.Item.GradientStyle = GradientStyles.Solid;
    this.radPageView1.SelectedPage.Item.BackColor = Color.Red;
    this.radPageView1.SelectedPage.Item.ForeColor = Color.Green;
}

private void RadPageView1_SelectedPageChanging(object sender, Telerik.WinControls.UI.RadPageViewCancelEventArgs e)
{
    RadPageViewPage oldPage = radPageView1.SelectedPage;
          
    if (oldPage != null)
    {
        oldPage.Item.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
        oldPage.Item.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local);
        oldPage.Item.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
    }
    e.Page.Item.GradientStyle = GradientStyles.Solid;
    e.Page.Item.BackColor = Color.Red;
    e.Page.Item.ForeColor= Color.Green;
}

You can use the SelectedPage property of the control to apply the colors when the application starts. I hope that this approach works for you.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Radek
Top achievements
Rank 2
Bronze
Iron
Iron
answered on 27 Apr 2026, 12:43 PM

Hi Dinko,

thank you — it works now. I only had to flip the logic: first apply the color settings to the old page, and then call ResetValue.

Radek

 

Tags
PageView
Asked by
Radek
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Dinko | Tech Support Engineer
Telerik team
Radek
Top achievements
Rank 2
Bronze
Iron
Iron
Share this question
or