public KryptonSeparator()
{
// The label cannot take the focus
SetStyle(ControlStyles.Selectable, false);
// Create the palette storage
_stateCommon = new PaletteSplitContainerRedirect(Redirector, PaletteBackStyle.PanelClient,
PaletteBorderStyle.ControlClient, PaletteBackStyle.SeparatorHighProfile,
PaletteBorderStyle.SeparatorHighProfile, NeedPaintDelegate);
// Never draw the border around the background
_stateCommon.BorderRedirect.OverrideBorderToFalse = true;
_stateDisabled = new PaletteSplitContainer(_stateCommon, _stateCommon.Separator, _stateCommon.Separator, NeedPaintDelegate);
_stateNormal = new PaletteSplitContainer(_stateCommon, _stateCommon.Separator, _stateCommon.Separator, NeedPaintDelegate);
_stateTracking = new PaletteSeparatorPadding(_stateCommon.Separator, _stateCommon.Separator, NeedPaintDelegate);
_statePressed = new PaletteSeparatorPadding(_stateCommon.Separator, _stateCommon.Separator, NeedPaintDelegate);
// Our view contains just a simple canvas that covers entire client area and a separator view
_drawSeparator = new ViewDrawSeparator(_stateDisabled.Separator, _stateNormal.Separator, _stateTracking, _statePressed,
_stateDisabled.Separator, _stateNormal.Separator, _stateTracking, _statePressed,
PaletteMetricPadding.SeparatorPaddingLowProfile, Orientation.Vertical);
// Get the separator to fill the entire client area
_drawDocker = new ViewDrawDocker(_stateNormal.Back, _stateNormal.Border);
_drawDocker.IgnoreAllBorderAndPadding = true;
_drawDocker.Add(_drawSeparator, ViewDockStyle.Fill);
// Create a separator controller to handle separator style behaviour
_separatorController = new SeparatorController(this, _drawSeparator, true, true, NeedPaintDelegate);
// Assign the controller to the view element to treat as a separator
_drawSeparator.MouseController = _separatorController;
_drawSeparator.KeyController = _separatorController;
_drawSeparator.SourceController = _separatorController;
// Create the view manager instance
ViewManager = new ViewManager(this, _drawDocker);
// Use timer to redraw after windows messages are processed
_redrawTimer = new Timer();
_redrawTimer.Interval = 1;
_redrawTimer.Tick += new EventHandler(OnRedrawTick);
// Set other internal starting values
_style = SeparatorStyle.HighProfile;
_orientation = Orientation.Vertical;
_allowMove = true;
_splitterIncrements = 1;
_splitterWidth = 5;
}