How to change border style after assigned ThemeName?

2 posts, 0 answers
  1. Tour
    Tour avatar
    1 posts
    Member since:
    May 2008

    Posted 28 Jun 2008 Link to this post

    I want the border shown after I assigned a ThemeName like "Office2007Blue" to RadPanel, but how? Thank you
  2. Mike
    Mike avatar
    640 posts

    Posted 30 Jun 2008 Link to this post

    Hello Tour,

    The Visibility property is the only RadProperty, which has the same priority when set through theme and through code. Generally speaking setting RadProperty through code would have greater priority. Nevertheless, you can apply the new value right after setting the ThemeName - for example in the code of Form.Load event handler:

    private void Form1_Load(object sender, EventArgs e) 
       this.radPanel1.PanelElement.Children[1].Visibility = ElementVisibility.Visible; 

    The tricky part here is to use the "UI element editor" in the visual studio designer for both setting the color of the border and to determine its "Child" index (it is [1] in the code sample above). Then you can use the index to access the border color from the code of your app.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top