Class BorderPrimitive
Represents a border that is drawn on the screen.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Primitives
Assembly: Telerik.WinControls.dll
Syntax
public class BorderPrimitive : BasePrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IBorderElement, IBoxStyle, IBoxElement, IPrimitiveElement, IShapedElement
Constructors
BorderPrimitive()
Declaration
public BorderPrimitive()
Fields
BorderBoxStyleProperty
BorderDashPatternProperty
BorderDashStyleProperty
BorderDrawModeProperty
BottomColorProperty
BottomShadowColorProperty
BottomWidthProperty
ForeColor2Property
ForeColor3Property
ForeColor4Property
GradientAngleProperty
GradientStyleProperty
InnerColor2Property
InnerColor3Property
InnerColor4Property
InnerColorProperty
LeftColorProperty
LeftShadowColorProperty
LeftWidthProperty
PaintUsingParentShapeProperty
Declaration
public static readonly RadProperty PaintUsingParentShapeProperty
Field Value
RadProperty
|
RightColorProperty
RightShadowColorProperty
RightWidthProperty
TopColorProperty
TopShadowColorProperty
TopWidthProperty
WidthProperty
Properties
BorderDashPattern
Specifies the pattern of dashed lines drawn when the BorderDashStyle is custom.
Declaration
[RadPropertyDefaultValue("BorderDashPattern", typeof(BorderPrimitive))]
public float[] BorderDashPattern { get; set; }
Property Value
System.Single[]
|
Implements
BorderDashStyle
Specifies the style of dashed lines drawn with a border.
Declaration
[RadPropertyDefaultValue("BorderDashStyle", typeof(BorderPrimitive))]
public DashStyle BorderDashStyle { get; set; }
Property Value
System.Drawing.Drawing2D.DashStyle
|
Implements
BorderDrawMode
Declaration
[RadPropertyDefaultValue("BorderDrawModes", typeof(BorderPrimitive))]
public BorderDrawModes BorderDrawMode { get; set; }
Property Value
BorderDrawModes
|
Implements
BorderSize
Retrieves size of the combined bottom, right, upper, and left border.
Declaration
public SizeF BorderSize { get; }
Property Value
System.Drawing.SizeF
|
Implements
BottomColor
Gets and sets the bottom border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the bottom border.
Declaration
[RadPropertyDefaultValue("BottomColor", typeof(BorderPrimitive))]
public Color BottomColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
BottomShadowColor
Gets and sets the bottom shadow color. This option applies only if fourBorders is chosen, and affects only the bottom border.
Declaration
[RadPropertyDefaultValue("BottomShadowColor", typeof(BorderPrimitive))]
public Color BottomShadowColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
BottomWidth
Gets or sets a float value width. This property has effect only if FourBorders style is used in BoxStyle property, and affects only the bottom border.
Declaration
[RadPropertyDefaultValue("BottomWidth", typeof(BorderPrimitive))]
public float BottomWidth { get; set; }
Property Value
System.Single
|
Implements
BoxStyle
Gets or sets the Border style. The two possible values are SingleBorder and FourBorder. In the single border case, all four sides share the same appearance although the entire border may have gradient. In four border case, each of the four sides may differ in appearance. For example, the left border may have different color, shadowcolor, and width from the rest. When SingleBorder is chosen, you should use the general properties such as width and color, and respectively, when the FourBorder style is chosen you should use properties prefixed with the corresponding side, for example, LeftColor, LeftWidth for the left side.
Declaration
[RadPropertyDefaultValue("BoxStyle", typeof(BorderPrimitive))]
public BorderBoxStyle BoxStyle { get; set; }
Property Value
BorderBoxStyle
|
Implements
FitToSizeMode
Declaration
public override RadFitToSizeMode FitToSizeMode { get; set; }
Property Value
RadFitToSizeMode
|
Overrides
ForeColor2
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("ForeColor2", typeof(BorderPrimitive))]
public virtual Color ForeColor2 { get; set; }
Property Value
System.Drawing.Color
|
Implements
ForeColor3
Gets or sets color used by radial, glass, office glass, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("ForeColor3", typeof(BorderPrimitive))]
public virtual Color ForeColor3 { get; set; }
Property Value
System.Drawing.Color
|
Implements
ForeColor4
Gets or sets color used by radial, glass, office glass, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("ForeColor4", typeof(BorderPrimitive))]
public virtual Color ForeColor4 { get; set; }
Property Value
System.Drawing.Color
|
Implements
GradientAngle
Gets or sets gradient angle for linear gradient measured in degrees.
Declaration
[RadPropertyDefaultValue("GradientAngle", typeof(BorderPrimitive))]
public float GradientAngle { get; set; }
Property Value
System.Single
|
Implements
GradientStyle
Gets or sets gradient style. Possible styles are solid, linear, radial, glass, office glass, gel, and vista.
Declaration
[RadPropertyDefaultValue("GradientStyle", typeof(BorderPrimitive))]
public GradientStyles GradientStyle { get; set; }
Property Value
GradientStyles
|
Implements
HorizontalWidth
Gets the horizontal width of the combined left and right border.
Declaration
public float HorizontalWidth { get; }
Property Value
System.Single
|
Implements
InnerColor
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor", typeof(BorderPrimitive))]
public virtual Color InnerColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
InnerColor2
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor2", typeof(BorderPrimitive))]
public virtual Color InnerColor2 { get; set; }
Property Value
System.Drawing.Color
|
Implements
InnerColor3
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor3", typeof(BorderPrimitive))]
public virtual Color InnerColor3 { get; set; }
Property Value
System.Drawing.Color
|
Implements
InnerColor4
Gets or sets color used by radial, glass, office glass, gel, and vista gradients. This is one of the colors that are used in the gradient effect.
Declaration
[RadPropertyDefaultValue("InnerColor4", typeof(BorderPrimitive))]
public virtual Color InnerColor4 { get; set; }
Property Value
System.Drawing.Color
|
Implements
LeftColor
Gets and sets the left border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the left border.
Declaration
[RadPropertyDefaultValue("LeftColor", typeof(BorderPrimitive))]
public Color LeftColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
LeftShadowColor
Gets and sets the left shadow color. This option applies only if fourBorders is chosen, and affects only the left border.
Declaration
[RadPropertyDefaultValue("LeftShadowColor", typeof(BorderPrimitive))]
public Color LeftShadowColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
LeftWidth
Gets or sets a float value width of the left border. This property has effect only if FourBorders style is used in BoxStyle property and affects only the width of the left border.
Declaration
[RadPropertyDefaultValue("LeftWidth", typeof(BorderPrimitive))]
public float LeftWidth { get; set; }
Property Value
System.Single
|
Implements
Offset
Gets the border offset of the primitive. It effectively retrieves the upper-left corner inside the primitive border. It takes into consideration the BoxStyle property and possible different widths of the left and the upper side.
Declaration
public SizeF Offset { get; }
Property Value
System.Drawing.SizeF
|
Implements
PaintUsingParentShape
Specifies whether the BorderPrimitive should draw the GraphicsPath defined by its Parent.Shape. If false, it will draw its bounding rectangle.
Declaration
[RadPropertyDefaultValue("PaintUsingParentShape", typeof(BorderPrimitive))]
public bool PaintUsingParentShape { get; set; }
Property Value
System.Boolean
|
RightColor
Gets and sets the right border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the right border.
Declaration
[RadPropertyDefaultValue("RightColor", typeof(BorderPrimitive))]
public Color RightColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
RightShadowColor
Gets and sets the right shadow color. This option applies only if fourBorders is chosen, and affects only the right border.
Declaration
[RadPropertyDefaultValue("RightShadowColor", typeof(BorderPrimitive))]
public Color RightShadowColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
RightWidth
Gets or sets a float value width of the right border. This property has effect only if FourBorders style is used in BoxStyle property, and affects only the right border.
Declaration
[RadPropertyDefaultValue("RightWidth", typeof(BorderPrimitive))]
public float RightWidth { get; set; }
Property Value
System.Single
|
Implements
ShouldPaintUsingParentShape
Declaration
protected override bool ShouldPaintUsingParentShape { get; }
Property Value
System.Boolean
|
Overrides
TopColor
Gets and sets the top border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the top border.
Declaration
[RadPropertyDefaultValue("TopColor", typeof(BorderPrimitive))]
public Color TopColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
TopShadowColor
Gets and sets the top shadow color. This option applies only if fourBorders is chosen, and affects only the top border.
Declaration
[RadPropertyDefaultValue("TopShadowColor", typeof(BorderPrimitive))]
public Color TopShadowColor { get; set; }
Property Value
System.Drawing.Color
|
Implements
TopWidth
Gets or sets a float value width of the top border . This property has effect only if FourBorders style is used in BoxStyle property, and affects only the top border.
Declaration
[RadPropertyDefaultValue("TopWidth", typeof(BorderPrimitive))]
public float TopWidth { get; set; }
Property Value
System.Single
|
Implements
VerticalWidth
Gets the vertical width of the combined bottom and upper border.
Declaration
public float VerticalWidth { get; }
Property Value
System.Single
|
Implements
Width
Gets or sets float value indicating the width of the border measured in pixels. It is only used when SingleBorder style is chosen for the BoxStyle property which effectively means that all four borders share the same width.
Declaration
[RadPropertyDefaultValue("Width", typeof(BorderPrimitive))]
public float Width { get; set; }
Property Value
System.Single
|
Implements
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
GetBorderThickness()
Gets the border thickness.
Declaration
public Padding GetBorderThickness()
Returns
System.Windows.Forms.Padding
An instance of System.Windows.Forms.Padding representing the border thickness. |
GetDefaultValue(RadPropertyValue, Object)
Declaration
protected override object GetDefaultValue(RadPropertyValue propVal, object baseDefaultValue)
Parameters
RadPropertyValue
propVal
|
System.Object
baseDefaultValue
|
Returns
System.Object
|
Overrides
GetStylablePropertiesFilter()
InitializeFields()
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
OnChildrenChanged(RadElement, ItemsChangeOperation)
Declaration
protected override void OnChildrenChanged(RadElement child, ItemsChangeOperation changeOperation)
Parameters
RadElement
child
|
ItemsChangeOperation
changeOperation
|
Overrides
OnParentChanged(RadElement)
Declaration
protected override void OnParentChanged(RadElement previousParent)
Parameters
RadElement
previousParent
|
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
PaintPrimitive(IGraphics, Single, SizeF)
Virtual method that paints the primitive on the screen. It may be overridden by the derived types.
Declaration
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters
IGraphics
graphics
|
System.Single
angle
|
System.Drawing.SizeF
scale
|
Overrides
ShouldSerializeProperty(PropertyDescriptor)
Declaration
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
Parameters
System.ComponentModel.PropertyDescriptor
property
|
Returns
System.Nullable<System.Boolean>
|
Overrides
ShouldUsePaintBuffer()
Declaration
protected virtual bool ShouldUsePaintBuffer()
Returns
System.Boolean
|
Explicit Interface Implementations
IPrimitiveElement.BorderThickness
Declaration
float IPrimitiveElement.BorderThickness { get; }
Returns
System.Single
|
Implements
IPrimitiveElement.GetExactPaintingRectangle(Single, SizeF)
Declaration
RectangleF IPrimitiveElement.GetExactPaintingRectangle(float angle, SizeF scale)
Parameters
System.Single
angle
|
System.Drawing.SizeF
scale
|
Returns
System.Drawing.RectangleF
|
Implements
IPrimitiveElement.GetPaintRectangle(Single, Single, SizeF)
Declaration
RectangleF IPrimitiveElement.GetPaintRectangle(float left, float angle, SizeF scale)
Parameters
System.Single
left
|
System.Single
angle
|
System.Drawing.SizeF
scale
|
Returns
System.Drawing.RectangleF
|
Implements
IPrimitiveElement.IsDesignMode
Declaration
bool IPrimitiveElement.IsDesignMode { get; }
Returns
System.Boolean
|
Implements
IPrimitiveElement.ShouldUsePaintBuffer()
Declaration
bool IPrimitiveElement.ShouldUsePaintBuffer()
Returns
System.Boolean
|