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

PageViewStripElement Bakcolor on unselected tab

1 Answer 64 Views
PageView
This is a migrated thread and some comments may be shown as answers.
nhalm
Top achievements
Rank 1
nhalm asked on 09 Aug 2011, 09:23 PM
I have an need to change the tabstrip backcolor to something other than the theme color when there is certain information in a tab. So far I have been able to use this:

Dim pageViewStripElement = TryCast(DirectCast((tcOrganization.ViewElement).ContentArea, Telerik.WinControls.UI.RadPageViewContentAreaElement).Owner, RadPageViewStripElement)
                DirectCast(pageViewStripElement, Telerik.WinControls.UI.RadPageViewElement).Items(1).NumberOfColors = 1
                DirectCast(pageViewStripElement, Telerik.WinControls.UI.RadPageViewElement).Items(1).BackColor = Drawing.Color.Yellow

That works fine if you mouse over the tab button but I want it to stay that color even in a state that is not moused over or selected.  How can I accomplish this without out using the theme builder.  I need to be able to have this happen for separate tabs on different forms so being able to accomplish this programatically is a must.  Thanks for any help!

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 10 Aug 2011, 04:15 PM
Hello Nick,

Thank you for writing.

You can set the color of RadPageViewPageItem to be visible at all times by setting the item DrawFill property to true:
Dim pageViewStripElement = TryCast(RadPageView1.ViewElement, RadPageViewStripElement)
pageViewStripElement.Items(1).DrawFill = True
pageViewStripElement.Items(1).NumberOfColors = 1
pageViewStripElement.Items(1).BackColor = Drawing.Color.Yellow

I hope that the provided information addresses your question. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
the Telerik team

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

Tags
PageView
Asked by
nhalm
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or