New to Telerik UI for WinForms? Start a free 30-day trial

Represents a primitive element that renders borders around other elements with comprehensive styling and customization options.

BorderPrimitive is a fundamental rendering component in the Telerik WinControls framework that provides sophisticated border rendering capabilities. It supports multiple border styles including solid, dotted, dashed, double borders, and complex multi-side border configurations with individual styling per side.

Key features include:

  • Multiple border box styles: single border, four-sided borders, and outer-inner border combinations
  • Individual side styling with different colors, widths, and styles for top, bottom, left, and right borders
  • Support for various border drawing modes and gradient effects
  • Integration with shape primitives for rounded corners and custom border shapes
  • Automatic thickness calculation and parent element border synchronization

BorderPrimitive is commonly used in conjunction with FillPrimitive to create complete visual styling for RadElements, providing both background fills and border outlines. It automatically handles DPI scaling and provides optimized rendering performance through caching and buffer management.

The primitive integrates seamlessly with the theming system and supports inheritance of border properties from parent elements, making it suitable for complex nested control scenarios.

Definition

Namespace:Telerik.WinControls.Primitives

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class BorderPrimitive : BasePrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IBorderElement, IBoxStyle, IBoxElement, IPrimitiveElement, IShapedElement

Inheritance: objectDisposableObjectRadObjectRadElementVisualElementBasePrimitiveBorderPrimitive...

Derived Classes: FormBorderPrimitive

Implements: IBorderElementIBoxElementIBoxStyleICustomTypeDescriptorIDisposableINotifyPropertyChangedIPrimitiveIPrimitiveElementIShapedElementIStylableNodeISupportSystemSkin...

Inherited Members BasePrimitive.BoxCategoryBasePrimitive.PaintElement(IGraphics, float, SizeF)BasePrimitive.IsEmptyVisualElement.DefaultSizePropertyVisualElement.ForeColorPropertyVisualElement.BackColorPropertyVisualElement.FontPropertyVisualElement.SmoothingModePropertyVisualElement.OpacityPropertyVisualElement.CustomFontPropertyVisualElement.CustomFontSizePropertyVisualElement.CustomFontStylePropertyVisualElement.OnFontChanged(EventArgs)VisualElement.OnPropertyChanging(RadPropertyChangingEventArgs)VisualElement.PaintChildren(IGraphics, Rectangle, float, SizeF, bool)VisualElement.PrePaintElement(IGraphics)VisualElement.PostPaintElement(IGraphics)VisualElement.GetScaledFont(float)VisualElement.GetScaledFont(float, Font)VisualElement.DefaultSizeVisualElement.ForeColorVisualElement.BackColorVisualElement.FontVisualElement.CustomFontVisualElement.CustomFontSizeVisualElement.CustomFontStyleVisualElement.SmoothingModeVisualElement.OpacityVisualElement.FontChangedRadElement.BoundsPropertyRadElement.BorderThicknessPropertyRadElement.PaddingPropertyRadElement.MarginPropertyRadElement.AlignmentPropertyRadElement.AutoSizeModePropertyRadElement.FitToSizeModePropertyRadElement.MinSizePropertyRadElement.EnabledPropertyRadElement.CanFocusPropertyRadElement.IsItemFocusedPropertyRadElement.IsFocusedPropertyRadElement.IsMouseOverPropertyRadElement.IsMouseOverElementPropertyRadElement.IsMouseDownPropertyRadElement.ShouldPaintPropertyRadElement.VisibilityPropertyRadElement.NamePropertyRadElement.ClassPropertyRadElement.ClipDrawingPropertyRadElement.ShapePropertyRadElement.MouseClickedEventRadElement.MouseDoubleClickedEventRadElement.MouseDownEventRadElement.MouseUpEventRadElement.MouseWheelEventRadElement.ChildElementAddedEventRadElement.ParentChangedEventRadElement.BoundsChangedEventRadElement.VisibilityChangingEventRadElement.EnabledChangedEventRadElement.ControlChangedEventRadElement.BackgroundShapePropertyRadElement.BackgroundShapePaintModePropertyRadElement.ContainsFocusPropertyRadElement.ContainsMousePropertyRadElement.MaxSizePropertyRadElement.RightToLeftPropertyRadElement.AutoSizePropertyRadElement.ZIndexPropertyRadElement.AngleTransformPropertyRadElement.ScaleTransformPropertyRadElement.PositionOffsetPropertyRadElement.TagPropertyRadElement.StretchHorizontallyPropertyRadElement.StretchVerticallyPropertyRadElement.UseCompatibleTextRenderingPropertyRadElement.ClickModePropertyRadElement.styleVersionRadElement.paintSystemSkinRadElement.SetPropertyValueCommandRadElement.GetPropertyValueCommandRadElement.StylePropertyRadElement.CallCreateChildElements()RadElement.SuspendReferenceUpdate()RadElement.ResumeReferenceUpdate()RadElement.CreateChildElements()RadElement.OnLoad(bool)RadElement.LoadCore()RadElement.OnLoaded()RadElement.OnUnload(ComponentThemableElementTree, bool)RadElement.UnloadCore(ComponentThemableElementTree)RadElement.OnUnloaded(ComponentThemableElementTree)RadElement.OnElementTreeChanged(ComponentThemableElementTree)RadElement.OnBeginDispose()RadElement.SetParent(RadElement)RadElement.UpdateReferences(ComponentThemableElementTree, bool, bool)RadElement.ResetLayout(bool)RadElement.HasInvisibleAncestor()RadElement.ResetLayoutCore()RadElement.InvalidateArrange()RadElement.InvalidateArrange(bool)RadElement.InvalidateMeasure()RadElement.InvalidateMeasure(bool)RadElement.UpdateLayout()RadElement.SuspendLayout()RadElement.SuspendLayout(bool)RadElement.ResumeLayout(bool)RadElement.ResumeLayout(bool, bool)RadElement.Arrange(RectangleF)RadElement.Measure(SizeF)RadElement.SetBounds(Rectangle)RadElement.SetBounds(int, int, int, int)RadElement.GetBoundingRectangle(Size)RadElement.GetBoundingRectangle(Rectangle)RadElement.GetDesiredSize(bool)RadElement.PointToScreen(Point)RadElement.PointFromScreen(Point)RadElement.PointToControl(Point)RadElement.PointFromControl(Point)RadElement.LocationToControl()RadElement.RectangleToScreen(Rectangle)RadElement.HitTest(Point)RadElement.OnRenderSizeChanged(SizeChangedInfo)RadElement.OnChildDesiredSizeChanged(RadElement)RadElement.OnLayoutPropertyChanged(RadPropertyChangedEventArgs)RadElement.ArrangeCore(RectangleF)RadElement.MeasureCore(SizeF)RadElement.ShouldArrangeChild(RadElement)RadElement.ShouldMeasureChild(RadElement)RadElement.MeasureChildren(SizeF)RadElement.GetArrangeRect(RectangleF)RadElement.CanExecuteLayoutOperation()RadElement.CalcLayoutOffset(PointF)RadElement.LockBounds()RadElement.UnlockBounds()RadElement.SetBoundsCore(Rectangle)RadElement.IsInValidState(bool)RadElement.Invalidate()RadElement.Invalidate(bool)RadElement.GetInvalidateBounds()RadElement.NotifyInvalidate(RadElement)RadElement.OnTransformationInvalidated()RadElement.PerformLayoutTransformation(ref RadMatrix)RadElement.PerformPaintTransformation(ref RadMatrix)RadElement.IsInGetAsBitmap()RadElement.PaintElementSkin(IGraphics)RadElement.PaintOverride(IGraphics, Rectangle, float, SizeF, bool)RadElement.PaintBackgroundShape(IGraphics)RadElement.PostPaintChildren(IGraphics, Rectangle, float, SizeF)RadElement.PaintChild(RadElement, IGraphics, Rectangle, float, SizeF, bool)RadElement.PaintShadow(RadElement, IGraphics)RadElement.PaintShadowCore(Graphics, Rectangle, RadItem)RadElement.GetShadowRect(ref Rectangle, int)RadElement.PaintFocusCues(IGraphics, Rectangle)RadElement.GetAsBitmap(IGraphics, Brush, float, SizeF)RadElement.GetAsTransformedBitmap(IGraphics, Brush, float, SizeF)RadElement.GetAsTransformedBitmap(Brush, float, SizeF)RadElement.GetAsTransformedBitmap(Rectangle, Brush, float, SizeF)RadElement.GetAsBitmapEx(Color, float, SizeF)RadElement.GetAsBitmapEx(Brush, float, SizeF)RadElement.GetAsBitmap(Brush, float, SizeF)RadElement.IsInVisibleClipBounds(Rectangle)RadElement.SetClipping(Graphics)RadElement.GetClipRect()RadElement.ShouldPaintChild(RadElement)RadElement.GetFocusRect()RadElement.GetCurrentShape()RadElement.GetPaintRectangle(float, float, SizeF)RadElement.GetPatchedRect(RectangleF, float, SizeF)RadElement.GetXPVisualStyle()RadElement.GetVistaVisualStyle()RadElement.InitializeSystemSkinPaint()RadElement.UnitializeSystemSkinPaint()RadElement.GetSystemSkinPaintBounds()RadElement.OnUseSystemSkinChanged(EventArgs)RadElement.ShouldPaintSystemSkin()RadElement.ComposeShouldPaintSystemSkin()RadElement.ResetStyleSettings(bool)RadElement.ResetStyleSettings(bool, RadProperty)RadElement.ProcessBehaviors(RadPropertyChangedEventArgs)RadElement.AddBehavior(PropertyChangeBehavior)RadElement.GetBehaviors()RadElement.RemoveBehavior(PropertyChangeBehavior)RadElement.ClearBehaviors()RadElement.AddRangeBehavior(PropertyChangeBehaviorCollection)RadElement.SetThemeApplied(bool)RadElement.OnStyleChanged(RadPropertyChangedEventArgs)RadElement.UnapplyStyle()RadElement.RemoveRangeBehaviors(PropertyChangeBehaviorCollection)RadElement.RemoveBehaviors(PropertyChangeBehavior)RadElement.RemoveRangeRoutedEventBehaviors(RoutedEventBehaviorCollection)RadElement.GetThemeEffectiveType()RadElement.GetChildrenByType(Type)RadElement.GetChildrenByBaseType(Type)RadElement.FindAncestorByThemeEffectiveType(Type)RadElement.FindAncestor<T>()RadElement.IsAncestorOf(RadElement)RadElement.FindDescendant<T>()RadElement.FindDescendant(Predicate<RadElement>)RadElement.FindDescendant(Type)RadElement.EnumDescendants(TreeTraversalMode)RadElement.EnumDescendants(Predicate<RadElement>, TreeTraversalMode)RadElement.EnumDescendants(Filter, TreeTraversalMode)RadElement.GetDescendants(Predicate<RadElement>, TreeTraversalMode)RadElement.GetDescendants(Filter, TreeTraversalMode)RadElement.GetAncestors(Filter)RadElement.GetAncestors(Predicate<RadElement>)RadElement.RaiseRoutedEvent(RadElement, RoutedEventArgs)RadElement.RaiseTunnelEvent(RadElement, RoutedEventArgs)RadElement.RaiseBubbleEvent(RadElement, RoutedEventArgs)RadElement.OnTunnelEvent(RadElement, RoutedEventArgs)RadElement.OnBubbleEvent(RadElement, RoutedEventArgs)RadElement.IsEventInProcess(RaisedRoutedEvent)RadElement.RegisterRoutedEvent(string, Type)RadElement.GetRegisterRoutedEvent(string, Type)RadElement.GetRegisterRoutedEvent(string, string)RadElement.GetRegisterRoutedEvent(string)RadElement.GetChildren(ChildrenListOptions)RadElement.SendToBack()RadElement.BringToFront()RadElement.IsChildOf(RadElement)RadElement.Focus()RadElement.Focus(bool)RadElement.SetFocusPropertySafe(bool)RadElement.KillFocus()RadElement.OnCLREventsRise(RoutedEventArgs)RadElement.OnMouseMove(MouseEventArgs)RadElement.OnMouseHover(EventArgs)RadElement.OnEnabledChanged(RadPropertyChangedEventArgs)RadElement.OnParentEnabledChanged(RadPropertyChangedEventArgs)RadElement.OnMouseDown(MouseEventArgs)RadElement.OnMouseUp(MouseEventArgs)RadElement.OnLostMouseCapture(MouseEventArgs)RadElement.OnClick(EventArgs)RadElement.OnDoubleClick(EventArgs)RadElement.OnMouseEnter(EventArgs)RadElement.OnMouseLeave(EventArgs)RadElement.PerformClick()RadElement.OnMouseWheel(MouseEventArgs)RadElement.DoMouseWheel(MouseEventArgs)RadElement.DoClick(EventArgs)RadElement.DoDoubleClick(EventArgs)RadElement.IsInputKey(InputKeyEventArgs)RadElement.MouseEventArgsFromControl(MouseEventArgs)RadElement.DoMouseDown(MouseEventArgs)RadElement.DoMouseUp(MouseEventArgs)RadElement.DoMouseMove(MouseEventArgs)RadElement.ShowScreenTip(ScreenTipNeededEventArgs)RadElement.HideScreenTip()RadElement.DoMouseHover(EventArgs)RadElement.OnShowScreenTip(ComponentInputBehavior)RadElement.RaiseClick(EventArgs)RadElement.RaiseDoubleClick(EventArgs)RadElement.RaiseMouseWheel(MouseEventArgs)RadElement.UpdateContainsFocus(bool)RadElement.DoMouseEnter(EventArgs)RadElement.DoMouseLeave(EventArgs)RadElement.GetValue(RadProperty)RadElement.AddStylePropertySetting(IPropertySetting)RadElement.SetValueCore(RadPropertyValue, object, object, ValueSource)RadElement.NotifyChildren(RadPropertyChangedEventArgs)RadElement.OnBoundsChanged(RadPropertyChangedEventArgs)RadElement.OnLocationChanged(RadPropertyChangedEventArgs)RadElement.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)RadElement.CanRaisePropertyChangeNotifications(RadPropertyValue)RadElement.IsPropertyCancelable(RadPropertyMetadata)RadElement.OnParentPropertyChanged(RadPropertyChangedEventArgs)RadElement.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadElement.ToString()RadElement.DisposeManagedResources()RadElement.PerformDispose(bool)RadElement.DisposeChildren()RadElement.GetStylableChildrenHierarchy()RadElement.GetStylableChildren()RadElement.GetClientRectangle(SizeF)RadElement.GetBorderThickness(BorderPrimitive)RadElement.DpiScaleChanged(SizeF)RadElement.ElementStateRadElement.DesiredSizeRadElement.IsLayoutSuspendedRadElement.BoundingRectangleRadElement.ControlBoundingRectangleRadElement.BypassLayoutPoliciesRadElement.IsArrangeValidRadElement.IsMeasureValidRadElement.TreeLevelRadElement.TransformRadElement.TotalTransformRadElement.UseSystemSkinRadElement.CanHaveOwnStyleRadElement.PropagateStyleToChildrenRadElement.ThemeEffectiveTypeRadElement.ElementTreeRadElement.ChildrenRadElement.ChildrenHierarchyRadElement.ParentRadElement.RoutedEventBehaviorsRadElement.LayoutableChildrenCountRadElement.ContainsFocusRadElement.ShouldHandleMouseInputRadElement.NotifyParentOnMouseInputRadElement.IsAbleToRespondToMouseEventsRadElement.AutoSizeRadElement.BoundsRadElement.LocationRadElement.SizeRadElement.BorderThicknessRadElement.PaddingRadElement.MarginRadElement.AlignmentRadElement.AutoSizeModeRadElement.EnabledRadElement.CanFocusRadElement.IsFocusedRadElement.IsMouseOverRadElement.IsMouseOverElementRadElement.IsMouseDownRadElement.InvalidateChildrenOnChildChangedRadElement.ShouldPaintRadElement.VisibilityRadElement.IsElementVisibleRadElement.NameRadElement.ClassRadElement.ClipDrawingRadElement.ShapeRadElement.MinSizeRadElement.MaxSizeRadElement.ZIndexRadElement.RightToLeftRadElement.UseCompatibleTextRenderingRadElement.BackgroundShapeRadElement.BackgroundShapePaintModeRadElement.ContainsMouseRadElement.CaptureRadElement.ScaleTransformRadElement.AngleTransformRadElement.PositionOffsetRadElement.SerializePropertiesRadElement.SerializeElementRadElement.SerializeChildrenRadElement.RenderingMaxFramerateRadElement.IsThemeAppliedRadElement.ShouldApplyThemeRadElement.UseCenteredAngleTransformRadElement.TagRadElement.StretchHorizontallyRadElement.StretchVerticallyRadElement.ClickModeRadElement.DoubleClickEnabledRadElement.CaptureOnMouseDownRadElement.IsItemHoveredRadElement.StyleRadElement.ToolTipTextRadElement.AutoToolTipRadElement.ScreenTipRadElement.AutoNumberKeyTipRadElement.DpiScaleFactorRadElement.LayoutUpdatedRadElement.MouseHoverRadElement.MouseMoveRadElement.MouseDownRadElement.MouseUpRadElement.ClickRadElement.DoubleClickRadElement.MouseEnterRadElement.MouseWheelRadElement.EnabledChangedRadElement.MouseLeaveRadElement.ChildrenChangedRadElement.LostMouseCaptureRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.GetInheritedValue(RadProperty)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing...

Constructors

C#
public BorderPrimitive()

Fields

Identifies the property that selects shared, per-side, or outer-and-inner border geometry.

C#
public static readonly RadProperty BorderBoxStyleProperty

Identifies the custom dash lengths used when BorderDashStyle is custom.

C#
public static readonly RadProperty BorderDashPatternProperty

Identifies the stroke pattern used to draw the border.

C#
public static readonly RadProperty BorderDashStyleProperty

Identifies the property that controls which border sides cover one another at corners.

C#
public static readonly RadProperty BorderDrawModeProperty

Identifies the color of the bottom border in four-border mode.

C#
public static readonly RadProperty BottomColorProperty

Identifies the shadow color of the bottom border in four-border mode.

C#
public static readonly RadProperty BottomShadowColorProperty

Identifies the bottom-side thickness used when BoxStyle is FourBorders.

C#
public static readonly RadProperty BottomWidthProperty

Identifies an additional outer-border color used by gradient rendering.

C#
public static RadProperty ForeColor2Property

Identifies an additional outer-border color used by gradient rendering.

C#
public static RadProperty ForeColor3Property

Identifies an additional outer-border color used by gradient rendering.

C#
public static RadProperty ForeColor4Property

Identifies the angle, in degrees, used by linear border gradients.

C#
public static RadProperty GradientAngleProperty

Identifies the gradient effect applied to border colors.

C#
public static RadProperty GradientStyleProperty

Identifies an additional inner-stroke color used by gradient rendering.

C#
public static RadProperty InnerColor2Property

Identifies an additional inner-stroke color used by gradient rendering.

C#
public static RadProperty InnerColor3Property

Identifies an additional inner-stroke color used by gradient rendering.

C#
public static RadProperty InnerColor4Property

Identifies the primary color of the inner stroke in outer-and-inner border mode.

C#
public static RadProperty InnerColorProperty

Identifies the color of the left border in four-border mode.

C#
public static readonly RadProperty LeftColorProperty

Identifies the shadow color of the left border in four-border mode.

C#
public static readonly RadProperty LeftShadowColorProperty

Identifies the left-side thickness used when BoxStyle is FourBorders.

C#
public static readonly RadProperty LeftWidthProperty

Identifies the property that determines whether the border follows its parent's shape.

C#
public static readonly RadProperty PaintUsingParentShapeProperty

Identifies the color of the right border in four-border mode.

C#
public static readonly RadProperty RightColorProperty

Identifies the shadow color of the right border in four-border mode.

C#
public static readonly RadProperty RightShadowColorProperty

Identifies the right-side thickness used when BoxStyle is FourBorders.

C#
public static readonly RadProperty RightWidthProperty

Identifies the color of the top border in four-border mode.

C#
public static readonly RadProperty TopColorProperty

Identifies the shadow color of the top border in four-border mode.

C#
public static readonly RadProperty TopShadowColorProperty

Identifies the top-side thickness used when BoxStyle is FourBorders.

C#
public static readonly RadProperty TopWidthProperty

Identifies the shared border thickness used when BoxStyle is SingleBorder.

C#
public static readonly RadProperty WidthProperty

Properties

Specifies the pattern of dashed lines drawn when the BorderDashStyle is custom.

C#
public float[] BorderDashPattern { get; set; }

Implements: IBorderElement.BorderDashPattern

Specifies the style of dashed lines drawn with a border.

C#
public DashStyle BorderDashStyle { get; set; }

Implements: IBorderElement.BorderDashStyle

C#
public BorderDrawModes BorderDrawMode { get; set; }

Implements: IBorderElement.BorderDrawMode

Retrieves size of the combined bottom, right, upper, and left border.

C#
[Browsable(false)]
public SizeF BorderSize { get; }

Implements: IBoxElement.BorderSize

Gets and sets the bottom border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the bottom border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color BottomColor { get; set; }

Implements: IBoxStyle.BottomColor

Gets and sets the bottom shadow color. This option applies only if fourBorders is chosen, and affects only the bottom border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color BottomShadowColor { get; set; }

Implements: IBoxStyle.BottomShadowColor

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.

C#
public float BottomWidth { get; set; }

Implements: IBoxElement.BottomWidth

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.

C#
public BorderBoxStyle BoxStyle { get; set; }

Implements: IBorderElement.BoxStyle

Gets or sets how the border fits within its parent; the default is FitToParentBounds.

C#
public override RadFitToSizeMode FitToSizeMode { get; set; }

Overrides: RadElement.FitToSizeMode

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.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public virtual Color ForeColor2 { get; set; }

Implements: IBorderElement.ForeColor2

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.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public virtual Color ForeColor3 { get; set; }

Implements: IBorderElement.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.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public virtual Color ForeColor4 { get; set; }

Implements: IBorderElement.ForeColor4

Gets or sets gradient angle for linear gradient measured in degrees.

C#
public float GradientAngle { get; set; }

Implements: IBorderElement.GradientAngle

Gets or sets gradient style. Possible styles are solid, linear, radial, glass, office glass, gel, and vista.

C#
public GradientStyles GradientStyle { get; set; }

Implements: IBorderElement.GradientStyle

Gets the horizontal width of the combined left and right border.

C#
[Browsable(false)]
public float HorizontalWidth { get; }

Implements: IBoxElement.HorizontalWidth

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.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public virtual Color InnerColor { get; set; }

Implements: IBorderElement.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.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public virtual Color InnerColor2 { get; set; }

Implements: IBorderElement.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.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public virtual Color InnerColor3 { get; set; }

Implements: IBorderElement.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.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public virtual Color InnerColor4 { get; set; }

Implements: IBorderElement.InnerColor4

Gets and sets the left border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the left border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color LeftColor { get; set; }

Implements: IBoxStyle.LeftColor

Gets and sets the left shadow color. This option applies only if fourBorders is chosen, and affects only the left border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color LeftShadowColor { get; set; }

Implements: IBoxStyle.LeftShadowColor

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.

C#
public float LeftWidth { get; set; }

Implements: IBoxElement.LeftWidth

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.

C#
[Browsable(false)]
public SizeF Offset { get; }

Implements: IBoxElement.Offset

Specifies whether the BorderPrimitive should draw the GraphicsPath defined by its Parent.Shape. If false, it will draw its bounding rectangle.

C#
public bool PaintUsingParentShape { get; set; }

Gets and sets the right border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the right border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color RightColor { get; set; }

Implements: IBoxStyle.RightColor

Gets and sets the right shadow color. This option applies only if fourBorders is chosen, and affects only the right border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color RightShadowColor { get; set; }

Implements: IBoxStyle.RightShadowColor

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.

C#
public float RightWidth { get; set; }

Implements: IBoxElement.RightWidth

Uses PaintUsingParentShape to determine whether border rendering follows the parent shape.

C#
protected override bool ShouldPaintUsingParentShape { get; }

Overrides: RadElement.ShouldPaintUsingParentShape

Gets and sets the top border color. This applies only if FourBorders is chosen for BoxStyle property, and affects only the top border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color TopColor { get; set; }

Implements: IBoxStyle.TopColor

Gets and sets the top shadow color. This option applies only if fourBorders is chosen, and affects only the top border.

C#
[TypeConverter(typeof(RadColorEditorConverter))]
public Color TopShadowColor { get; set; }

Implements: IBoxStyle.TopShadowColor

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.

C#
public float TopWidth { get; set; }

Implements: IBoxElement.TopWidth

Gets the vertical width of the combined bottom and upper border.

C#
[Browsable(false)]
public float VerticalWidth { get; }

Implements: IBoxElement.VerticalWidth

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.

C#
public float Width { get; set; }

Implements: IBoxElement.Width

Methods

Arranges the optional nested border inside this border's own thickness.

C#
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters:finalSizeSizeF

The final size allocated to this border.

Returns:

SizeF

The arranged size reported by the base implementation.

Overrides: RadElement.ArrangeOverride(SizeF)

Gets the border thickness.

C#
public Padding GetBorderThickness()
Returns:

Padding

An instance of Padding representing the border thickness.

Supplies border-specific defaults for color, sizing, and smoothing properties.

C#
protected override object GetDefaultValue(RadPropertyValue propVal, object baseDefaultValue)
Parameters:propValRadPropertyValue

The property value being initialized.

baseDefaultValueobject

The default value supplied by the base implementation.

Returns:

object

The border-specific default for recognized properties, or baseDefaultValue otherwise.

Overrides: RadObject.GetDefaultValue(RadPropertyValue, object)

Limits the properties exposed for styling to border, appearance, and behavior settings.

C#
public override Filter GetStylablePropertiesFilter()
Returns:

Filter

A filter combining the border, appearance, and behavior property groups.

Overrides: RadElement.GetStylablePropertiesFilter()

Creates the renderer used to draw this border.

C#
protected override void InitializeFields()

Overrides: BasePrimitive.InitializeFields()

Measures the optional nested border in the space remaining after this border's thickness is accounted for.

C#
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters:availableSizeSizeF

The size available for measuring this border and its nested border.

Returns:

SizeF

The desired size reported by the base implementation.

Overrides: RadElement.MeasureOverride(SizeF)

Tracks nested border primitives so their thickness can be included in the parent border.

C#
protected override void OnChildrenChanged(RadElement child, ItemsChangeOperation changeOperation)
Parameters:childRadElement

The child element that was added or removed.

changeOperationItemsChangeOperation

Indicates whether the child was added or removed.

Overrides: RadElement.OnChildrenChanged(RadElement, ItemsChangeOperation)

Synchronizes the new parent element's border thickness with this border.

C#
protected override void OnParentChanged(RadElement previousParent)
Parameters:previousParentRadElement

The parent the element had before the change.

Overrides: RadElement.OnParentChanged(RadElement)

Recalculates and synchronizes border thickness when border geometry or visibility changes.

C#
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters:eRadPropertyChangedEventArgs

Information about the property change.

Overrides: VisualElement.OnPropertyChanged(RadPropertyChangedEventArgs)

Renders the border primitive using the specified graphics context with rotation and scaling support.

C#
public override void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters:graphicsIGraphics

The graphics context to use for rendering the border.

anglefloat

The rotation angle in degrees to apply during rendering.

scaleSizeF

The scaling factor to apply during rendering.

Overrides: BasePrimitive.PaintPrimitive(IGraphics, float, SizeF)

This method delegates the actual border painting to the internal border implementation, which handles the complex rendering logic for different border styles, shapes, and effects. The rendering is optimized for performance and supports advanced features like anti-aliasing and gradient effects.

Applies border-specific rules when deciding whether designer serialization should include a property.

C#
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
Parameters:propertyPropertyDescriptorReturns:

bool?

Overrides: RadObject.ShouldSerializeProperty(PropertyDescriptor)

Requests serialization for SmoothingMode when it is not AntiAlias and for FitToSizeMode when it is not FitToParentBounds. Other properties use the base implementation.

Determines whether the painting pipeline may reuse a cached buffer for this border.

C#
protected virtual bool ShouldUsePaintBuffer()
Returns:

bool

true to allow paint-buffer reuse; otherwise, false.