Bevel effect like Delphi/BCB

4 posts, 0 answers
  1. shortie
    shortie avatar
    23 posts
    Member since:
    Jul 2008

    Posted 25 Dec 2008 Link to this post


    Today, one of my customers ask me to set the RadLabel to beveled (like the beveled label they see in Delphi or BCB).
    Hornestly, I have no idea for that.
    Any hint?
    Thanks in advance.

  2. Nick
    Nick avatar
    767 posts

    Posted 29 Dec 2008 Link to this post

    Hello ChunChang,

    Thank you for your question. Please review the following help topic from our documenation about BorderPrimitive customization options. We do not have bavel effect out of the box, but it can be achieved fairly easily, using the design time UI Element Editor option. Do not hesitate to write me back if you have more questions.

    Sincerely yours,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Chan
    Chan avatar
    14 posts
    Member since:
    Nov 2012

    Posted 06 Jun 2013 Link to this post

    Helo !

    I need to display the RadListView items and groups with bevelled effect how can i achieve this.

    The appearance of all Item and Groups must be bevelled.

    I have a hint that there is something hidden in border primitive and gradient styles and gradient angle to achieve this but I am unable to figure out exact propety values for borders, gradient style, gradient angle.


  4. Ivan Petrov
    Ivan Petrov avatar
    715 posts

    Posted 11 Jun 2013 Link to this post

    Hello Chan,

    Thank you for writing.

    To achieve a beveled rectangle you can create a custom shape inheriting from ElementShape. Here is an example:
    public class BeveledShape : ElementShape
        private int width;
        public BeveledShape()
            : this(5)
        { }
        public BeveledShape(int width)
            this.width = width;
        public int Width
            get { return width; }
            set { width = value; }
        public override GraphicsPath CreatePath(Rectangle bounds)
            GraphicsPath path = new GraphicsPath();
            path.AddLine(bounds.X + this.Width, bounds.Y, bounds.Right - this.Width, bounds.Y);
            path.AddLine(bounds.Right - this.Width, bounds.Y, bounds.Right, bounds.Y + this.Width);
            path.AddLine(bounds.Right, bounds.Y + this.Width, bounds.Right, bounds.Bottom - this.Width);
            path.AddLine(bounds.Right, bounds.Bottom - this.Width, bounds.Right - this.Width, bounds.Bottom);
            path.AddLine(bounds.Right - this.Width, bounds.Bottom, bounds.X + this.Width, bounds.Bottom);
            path.AddLine(bounds.X + this.Width, bounds.Bottom, bounds.X, bounds.Bottom - this.Width);
            path.AddLine(bounds.X, bounds.Bottom - this.Width, bounds.X, bounds.Y + this.Width);
            path.AddLine(bounds.X, bounds.Y + this.Width, bounds.X, bounds.Y + this.Width);
            return path;

    The you can use the VisualItemCreating event to apply it to all elements that are created:
    this.radListView1.VisualItemCreating += radListView1_VisualItemCreating;
    private void radListView1_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e)
        e.VisualItem.Shape = new BeveledShape();

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Ivan Petrov
    RadChart for WinForms is obsolete. Now what?
Back to Top