3 Answers, 1 is accepted
0
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,
Nick
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
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,
Nick
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chan
Top achievements
Rank 1
answered on 06 Jun 2013, 07:56 AM
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.
thanks,
Chan
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.
thanks,
Chan
0
Hello Chan,
Thank you for writing.
To achieve a beveled rectangle you can create a custom shape inheriting from ElementShape. Here is an example:
The you can use the VisualItemCreating event to apply it to all elements that are created:
I hope this will be useful. Should you have further questions, I would be glad to help.
Regards,
Ivan Petrov
Telerik
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.
Regards,
Ivan Petrov
Telerik
RadChart for WinForms is obsolete. Now what?