/// <summary>
        /// Initialize a new instance of the ViewDrawBorderEdge class.
        /// </summary>
        /// <param name="palette">Palette source for drawing details.</param>
        /// <param name="orientation">Initial orientation of the border.</param>
        public ViewDrawBorderEdge(PaletteBorderEdge palette,
                                  Orientation orientation)
            : base(palette)
        {
            Debug.Assert(palette != null);

            // Remember initial settings
            _palette    = palette;
            Orientation = orientation;

            // Create the forced border and override the graphics hint
            _borderForced = new PaletteBackInheritForced(palette)
            {
                ForceGraphicsHint = PaletteGraphicsHint.None
            };
            base.SetPalettes(_borderForced);
        }
 /// <summary>
 /// Initialize a new instance of the ViewDrawSplitCanvas class.
 /// </summary>
 /// <param name="paletteBack">Palette source for the background.</param>
 /// <param name="paletteBorder">Palette source for the border.</param>
 /// <param name="paletteMetric">Palette source for metric values.</param>
 /// <param name="metricPadding">Matric used to get padding values.</param>
 /// <param name="orientation">Visual orientation of the content.</param>
 public ViewDrawSplitCanvas(IPaletteBack paletteBack,
                            IPaletteBorder paletteBorder,
                            IPaletteMetric paletteMetric,
                            PaletteMetricPadding metricPadding,
                            VisualOrientation orientation)
 {
     // Cache the starting values
     PaletteBorder    = paletteBorder;
     PaletteBack      = paletteBack;
     _paletteBackDraw = new PaletteBackInheritForced(PaletteBack)
     {
         ForceDraw = InheritBool.True
     };
     _paletteBackLight = new PaletteBackLightenColors(PaletteBack);
     PaletteMetric     = paletteMetric;
     _metricPadding    = metricPadding;
     Orientation       = orientation;
     DrawTabBorder     = false;
     DrawCanvas        = true;
     Splitter          = false;
 }
        /// <summary>
        /// Initialize a new instance of the KryptonGroupPanel class.
        /// </summary>
        /// <param name="alignControl">Container control for alignment.</param>
        /// <param name="stateCommon">Common appearance state to inherit from.</param>
        /// <param name="stateDisabled">Disabled appearance state.</param>
        /// <param name="stateNormal">Normal appearance state.</param>
        /// <param name="layoutHandler">Callback delegate for layout processing.</param>
        public KryptonGroupPanel(Control alignControl,
                                 PaletteDoubleRedirect stateCommon,
                                 PaletteDouble stateDisabled,
                                 PaletteDouble stateNormal,
                                 NeedPaintHandler layoutHandler)
            : base(stateCommon, stateDisabled, stateNormal)
        {
            // Remember the delegate used to notify layouts
            _layoutHandler = layoutHandler;

            // Create the forced overrides to enforce the graphics option we want
            _forcedDisabled = new PaletteBackInheritForced(stateDisabled.Back);
            _forcedNormal   = new PaletteBackInheritForced(stateNormal.Back);

            // We never allow the anti alias option as it prevent transparent background working
            _forcedDisabled.ForceGraphicsHint = PaletteGraphicsHint.None;
            _forcedNormal.ForceGraphicsHint   = PaletteGraphicsHint.None;

            // Set the correct initial palettes
            ViewDrawPanel.SetPalettes(Enabled ? _forcedNormal : _forcedDisabled);

            // Make sure the alignment of the group panel is as that of the parent
            ViewManager.AlignControl = alignControl;
        }