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

Flat Button

3 Answers 699 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Sperduti
Top achievements
Rank 1
Sperduti asked on 29 Nov 2007, 01:55 PM
Is there any way to apply Flat style on RadButton element ?

Regards,

YSP

3 Answers, 1 is accepted

Sort by
0
Sperduti
Top achievements
Rank 1
answered on 30 Nov 2007, 08:30 AM
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 ?

Thanks,

YSP
0
Nikolay
Telerik team
answered on 30 Nov 2007, 01:49 PM
Hello Sperduti,

Yes, there are two ways to apply flat style for RadButton:
  1. 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[0].Children[0] as FillPrimitive).GradientStyle = GradientStyles.Solid;  
     
    // Set the solid color to a color of your choice (in this case trasparent)  
    (radButton1.RootElement.Children[0].Children[0] as FillPrimitive).BackColor = Color.Yellow;  
     
    // In case you want to hide the border, choose between these two lines:  
    (radButton1.RootElement.Children[0].Children[2] as BorderPrimitive).Visibility = ElementVisibility.Hidden;  
    (radButton1.RootElement.Children[0].Children[2] as BorderPrimitive).ForeColor = Color.Transparent; 

  2. 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.
 

All the best,

Nikolay

the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
JigneshGN
Top achievements
Rank 2
answered on 09 Feb 2010, 08:00 AM
Hi,

I had same confusion.

I solved my problem following your steps.

Thank you.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Sperduti
Top achievements
Rank 1
Answers by
Sperduti
Top achievements
Rank 1
Nikolay
Telerik team
JigneshGN
Top achievements
Rank 2
Share this question
or