Exemplo n.º 1
0
        /// <summary>
        /// Initialize a new instance of the PaletteHeaderGroup class.
        /// </summary>
        /// <param name="inheritHeaderGroup">Source for inheriting palette defaulted values.</param>
        /// <param name="inheritHeaderPrimary">Source for inheriting primary header defaulted values.</param>
        /// <param name="inheritHeaderSecondary">Source for inheriting secondary header defaulted values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteHeaderGroup(PaletteHeaderGroupRedirect inheritHeaderGroup,
                                  PaletteHeaderPaddingRedirect inheritHeaderPrimary,
                                  PaletteHeaderPaddingRedirect inheritHeaderSecondary,
                                  NeedPaintHandler needPaint)
            : base(inheritHeaderGroup, needPaint)
        {
            Debug.Assert(inheritHeaderGroup != null);
            Debug.Assert(inheritHeaderPrimary != null);
            Debug.Assert(inheritHeaderSecondary != null);

            // Remember the inheritance
            _inherit = inheritHeaderGroup;

            // Create the palette storage
            _paletteHeaderPrimary   = new PaletteTripleMetric(inheritHeaderPrimary, needPaint);
            _paletteHeaderSecondary = new PaletteTripleMetric(inheritHeaderSecondary, needPaint);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialize a new instance of the PaletteHeaderGroupRedirect class.
        /// </summary>
        /// <param name="redirectHeaderGroup">Inheritence redirection for header group.</param>
        /// <param name="redirectHeaderPrimary">Inheritence redirection for primary header.</param>
        /// <param name="redirectHeaderSecondary">Inheritence redirection for secondary header.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteHeaderGroupRedirect(PaletteRedirect redirectHeaderGroup,
                                          PaletteRedirect redirectHeaderPrimary,
                                          PaletteRedirect redirectHeaderSecondary,
                                          NeedPaintHandler needPaint)
            : base(redirectHeaderGroup, PaletteBackStyle.ControlClient,
                   PaletteBorderStyle.ControlClient, needPaint)
        {
            Debug.Assert(redirectHeaderGroup != null);
            Debug.Assert(redirectHeaderSecondary != null);
            Debug.Assert(redirectHeaderPrimary != null);

            // Remember the redirect reference
            _redirect = redirectHeaderGroup;

            // Create the palette storage
            _paletteHeaderPrimary   = new PaletteHeaderPaddingRedirect(redirectHeaderPrimary, PaletteBackStyle.HeaderPrimary, PaletteBorderStyle.HeaderPrimary, PaletteContentStyle.HeaderPrimary, needPaint);
            _paletteHeaderSecondary = new PaletteHeaderPaddingRedirect(redirectHeaderSecondary, PaletteBackStyle.HeaderSecondary, PaletteBorderStyle.HeaderSecondary, PaletteContentStyle.HeaderSecondary, needPaint);

            // Default other values
            _overlayHeaders = InheritBool.Inherit;
        }