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

RADButton Circle

1 Answer 300 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
BB
Top achievements
Rank 1
BB asked on 12 Mar 2011, 08:55 PM

I need a RADButton which is round like a circle and an Image in it.

Thank you very much.

1 Answer, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 14 Mar 2011, 10:26 AM
Hello,

To do this, first create a rounded button
using Telerik.WinControls.UI;
using Telerik.WinControls;
  
public class RoundButton : RadButton
{
    public RoundButton()
        : base()
    {
  
    }
  
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadButton).FullName;
        }
    
  
  
    protected override void OnLoad(System.Drawing.Size desiredSize)
    {
        Telerik.WinControls.EllipseShape circle = new EllipseShape();
  
        this.ButtonElement.Shape = circle;
  
        base.OnLoad(desiredSize);
    }
}

and then give your rounded button an image
this.roundButton1.Size = new Size(81, 74);
this.roundButton1.DisplayStyle = Telerik.WinControls.DisplayStyle.Image;
this.roundButton1.Image = // some round image

hope that helps
Richard
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
BB
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Share this question
or