/// <summary> /// Initialize a new instance of the KryptonPaletteGrids class. /// </summary> /// <param name="redirector">Palette redirector for sourcing inherited values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> 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); }