Show / Hide Table of Contents

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
  • BorderStyle maps to palette border style
  • StateCommon, 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 KryptonSeparator when you need a separator with extra chrome; use KryptonBorderEdge for a minimal line.
  • Dock or anchor the control; rely on AutoSize for thickness in the cross-axis.

See also

  • KryptonSeparator
  • Controls index
Back to top Krypton Component Suite BSD 3-Clause License © Component Factory Pty Ltd, 2006 - 2016, All rights reserved. Modifications by Peter Wagner (aka Wagnerp), Simon Coghlan (aka Smurf-IV), Giduac, Ahmed Abdelhameed, tobitege, KamaniAR, Lesandro Gotardo (aka lesandrog), Jorge A. Avilés (aka mcpbcs) et al. 2017 - 2025. All rights reserved. https://github.com/Krypton-Suite