Implement storage for palette content image details.
Inheritance: Storage
Example #1
0
        /// <summary>
        /// Initialize a new instance of the PaletteContent class.
        /// </summary>
        /// <param name="inherit">Source for inheriting defaulted values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteContent(IPaletteContent inherit,
                              NeedPaintHandler needPaint)
        {
            Debug.Assert(inherit != null);

            // Remember inheritance
            _inherit = inherit;

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

            // Create the content storage for sub objects
            _image     = new PaletteContentImage(needPaint);
            _shortText = new PaletteContentText(needPaint);
            _longText  = new PaletteContentText(needPaint);
        }
        /// <summary>
        /// Initialize a new instance of the PaletteNavContent class.
        /// </summary>
        /// <param name="inherit">Source for inheriting defaulted values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteNavContent(IPaletteContent inherit,
                                 NeedPaintHandler needPaint)
        {
            Debug.Assert(inherit != null);

            // Remember inheritance
            _inherit = inherit;

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

            // Create the content storage for sub objects
            _image = new PaletteContentImage(needPaint);
            _shortText = new PaletteNavContentText(needPaint);
            _longText = new PaletteNavContentText(needPaint);
        }