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

How to change border style after assigned ThemeName?

1 Answer 38 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Tour
Top achievements
Rank 1
Tour asked on 28 Jun 2008, 10:09 AM
I want the border shown after I assigned a ThemeName like "Office2007Blue" to RadPanel, but how? Thank you

1 Answer, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 30 Jun 2008, 02:23 PM
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,
Mike
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Themes and Visual Style Builder
Asked by
Tour
Top achievements
Rank 1
Answers by
Mike
Telerik team
Share this question
or