ComponentFactory.Krypton.Toolkit.KryptonPaletteGrids.KryptonPaletteGrids C# (CSharp) Method

KryptonPaletteGrids() private method

Initialize a new instance of the KryptonPaletteGrids class.
private KryptonPaletteGrids ( PaletteRedirect redirector, NeedPaintHandler needPaint ) : System
redirector PaletteRedirect Palette redirector for sourcing inherited values.
needPaint NeedPaintHandler Delegate for notifying paint requests.
return System
        internal KryptonPaletteGrids(PaletteRedirect redirector,
                                     NeedPaintHandler needPaint)
        {
            Debug.Assert(redirector != null);

            _gridCommon = new KryptonPaletteGrid(redirector, GridStyle.List, needPaint);
            _gridList = new KryptonPaletteGrid(redirector, GridStyle.List, needPaint);
            _gridSheet = new KryptonPaletteGrid(redirector, GridStyle.Sheet, needPaint);
            _gridCustom1 = new KryptonPaletteGrid(redirector, GridStyle.Custom1, needPaint);

            // Create redirectors for inheriting from style specific to style common
            PaletteRedirectGrids redirectCommon = new PaletteRedirectGrids(redirector, _gridCommon);

            // Ensure the specific styles inherit to the common grid style
            _gridList.SetRedirector(redirectCommon);
            _gridSheet.SetRedirector(redirectCommon);
            _gridCustom1.SetRedirector(redirectCommon);
        }