ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGalleryItem.Render C# (CSharp) Method

Render() public method

Perform a render of the elements.
public Render ( RenderContext context ) : void
context ComponentFactory.Krypton.Toolkit.RenderContext Rendering context.
return void
        public override void Render(RenderContext context)
        {
            Debug.Assert(context != null);

            // If this item is being tracked, then show as tracking
            PaletteState tempState = ElementState;
            if (_gallery.TrackingIndex == _imageIndex)
            {
                switch(tempState)
                {
                    case PaletteState.Normal:
                        ElementState = PaletteState.Tracking;
                        break;
                    case PaletteState.CheckedNormal:
                        ElementState = PaletteState.CheckedTracking;
                        break;
                }
            }

            // Let base class draw using the temp state, then put back to original
            base.Render(context);
            ElementState = tempState;
        }