Ejemplo n.º 1
0
        /// <summary>
        /// Initialize a new instance of the PaletteRibbonTabContentRedirect class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteRibbonTabContentRedirect(PaletteRedirect redirect,
                                               NeedPaintHandler needPaint)
        {
            Debug.Assert(redirect != null);

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

            _drawRedirect = new PaletteRibbonDoubleRedirect(redirect,
                                                            PaletteRibbonBackStyle.RibbonTab,
                                                            PaletteRibbonTextStyle.RibbonTab,
                                                            needPaint);

            _contentInherit = new PaletteContentInheritRedirect(redirect);
            _content        = new PaletteNavContent(_contentInherit, needPaint);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialize a new instance of the PaletteRibbonTabContent class.
        /// </summary>
        /// <param name="paletteBack">Source for inheriting palette ribbon background.</param>
        /// <param name="paletteText">Source for inheriting palette ribbon text.</param>
        /// <param name="paletteContent">Source for inheriting palette content.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteRibbonTabContent(IPaletteRibbonBack paletteBack,
                                       IPaletteRibbonText paletteText,
                                       IPaletteContent paletteContent,
                                       NeedPaintHandler needPaint)
        {
            Debug.Assert(paletteBack != null);
            Debug.Assert(paletteText != null);
            Debug.Assert(paletteContent != null);

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

            // Create storage that maps onto the inherit instances
            _paletteTabDraw = new PaletteRibbonDouble(paletteBack, paletteText, needPaint);
            _paletteContent = new PaletteNavContent(paletteContent, needPaint);
        }