If I select Plain theme and the same backcolor than my parent form, I can have flat rad button style. But there isn't another way ?
answered on 30 Nov 2007, 01:49 PM
Yes, there are two ways to apply flat style for RadButton:
Set it programmatically. Just put the following code snippet in the Form_Load event handler:
// Set the RadButton color gradient style to solid
(radButton1.RootElement.Children.Children as FillPrimitive).GradientStyle = GradientStyles.Solid;
// Set the solid color to a color of your choice (in this case trasparent)
(radButton1.RootElement.Children.Children as FillPrimitive).BackColor = Color.Yellow;
// In case you want to hide the border, choose between these two lines:
(radButton1.RootElement.Children.Children as BorderPrimitive).Visibility = ElementVisibility.Hidden;
(radButton1.RootElement.Children.Children as BorderPrimitive).ForeColor = Color.Transparent;
Use Visual Style Builder to make a theme. In the Control Structure panel navigate to RootRadElement >> RadButtonElement >> FillPrimitive. Then change the GradientStyle to Solid and set a color for each of the RadButton states. For more info on using Visual Style Builder, please take a look at these video tutorials: Visual Style Builder I Visual Style Builder II
If you have further questions, do not hesitate to contact us.