KryptonBorderEdge
Overview
KryptonBorderEdge draws a single horizontal or vertical themed line, typically used as a separator between UI regions. It is a lightweight, non-focusable control with auto-size defaults.
Namespace: Krypton.Toolkit
Assembly: Krypton.Toolkit
Default property: Orientation
Inheritance: VisualControlBase → KryptonBorderEdge
Key features
- Horizontal or vertical orientation
BorderStylemaps to palette border styleStateCommon,StateNormal,StateDisabled- Auto-size by default (
AutoSize = true,GrowAndShrink)
Constructor
public KryptonBorderEdge()
Properties
Orientation
[DefaultValue(Orientation.Horizontal)]
public virtual Orientation Orientation { get; set; }
Direction of the edge line.
BorderStyle
[DefaultValue(PaletteBorderStyle.ControlClient)]
public PaletteBorderStyle BorderStyle { get; set; }
Palette border style used for drawing.
StateCommon / StateDisabled / StateNormal
public PaletteBorderEdgeRedirect StateCommon { get; }
public PaletteBorderEdge StateDisabled { get; }
public PaletteBorderEdge StateNormal { get; }
Per-state border overrides.
AutoSize / AutoSizeMode
[DefaultValue(true)]
public override bool AutoSize { get; set; }
[DefaultValue(AutoSizeMode.GrowAndShrink)]
public AutoSizeMode AutoSizeMode { get; set; }
Methods
GetPreferredSize
public override Size GetPreferredSize(Size proposedSize)
Returns thickness appropriate for orientation.
SetFixedState
public virtual void SetFixedState(PaletteState state)
Forces palette state for rendering.
Hidden properties
BackColor, ForeColor, Font, TabIndex, TabStop, and Padding are hidden; appearance is border-only.
Usage example
kryptonBorderEdge1.Orientation = Orientation.Horizontal;
kryptonBorderEdge1.BorderStyle = PaletteBorderStyle.ControlClient;
kryptonBorderEdge1.Dock = DockStyle.Top;
Best practices
- Use
KryptonSeparatorwhen you need a separator with extra chrome; useKryptonBorderEdgefor a minimal line. - Dock or anchor the control; rely on
AutoSizefor thickness in the cross-axis.