PageViewStripElement Bakcolor on unselected tab

2 posts, 0 answers
  1. nhalm
    nhalm avatar
    8 posts
    Member since:
    Jun 2010

    Posted 09 Aug 2011 Link to this post

    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!

  2. Stefan
    Stefan avatar
    2891 posts

    Posted 10 Aug 2011 Link to this post

    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.

    the Telerik team

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

  3. DevCraft banner
Back to Top