/// <summary>
        /// Initialize a new instance of the PaletteInputControlTripleStates class.
        /// </summary>
        /// <param name="inherit">Source for inheriting values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteInputControlTripleStates(IPaletteTriple inherit,
                                               NeedPaintHandler needPaint)
        {
            Debug.Assert(inherit != null);

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create storage that maps onto the inherit instances
            Back    = new PaletteInputControlBackStates(inherit.PaletteBack, needPaint);
            Border  = new PaletteBorder(inherit.PaletteBorder, needPaint);
            Content = new PaletteInputControlContentStates(inherit.PaletteContent, needPaint);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialize a new instance of the PaletteInputControlTripleRedirect class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection instance.</param>
        /// <param name="backStyle">Initial background style.</param>
        /// <param name="borderStyle">Initial border style.</param>
        /// <param name="contentStyle">Initial content style.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteInputControlTripleRedirect(PaletteRedirect redirect,
                                                 PaletteBackStyle backStyle,
                                                 PaletteBorderStyle borderStyle,
                                                 PaletteContentStyle contentStyle,
                                                 NeedPaintHandler needPaint)
        {
            Debug.Assert(redirect != null);

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Store the inherit instances
            _backInherit    = new PaletteBackInheritRedirect(redirect, backStyle);
            _borderInherit  = new PaletteBorderInheritRedirect(redirect, borderStyle);
            _contentInherit = new PaletteContentInheritRedirect(redirect, contentStyle);
            _metricRedirect = new PaletteMetricRedirect(redirect);

            // Create storage that maps onto the inherit instances
            Back    = new PaletteInputControlBackStates(_backInherit, needPaint);
            Border  = new PaletteBorder(_borderInherit, needPaint);
            Content = new PaletteInputControlContentStates(_contentInherit, needPaint);
        }