ComponentFactory.Krypton.Toolkit.RenderStandard.DrawDropDownButton C# (CSharp) Method

DrawDropDownButton() public method

Perform drawing of a drop down button.
public DrawDropDownButton ( RenderContext context, Rectangle displayRect, IPalette palette, PaletteState state, VisualOrientation orientation ) : void
context RenderContext Render context.
displayRect System.Drawing.Rectangle Display area available for drawing.
palette IPalette Palette for sourcing display values.
state PaletteState State for which image size is needed.
orientation VisualOrientation How to orientate the image.
return void
        public override void DrawDropDownButton(RenderContext context,
                                                Rectangle displayRect,
                                                IPalette palette,
                                                PaletteState state,
                                                VisualOrientation orientation)
        {
            Debug.Assert(context != null);
            Debug.Assert(palette != null);

            // Validate parameter references
            if (context == null) throw new ArgumentNullException("context");
            if (palette == null) throw new ArgumentNullException("palette");

            // Grab an image appropriate to the state
            Image drawImage = palette.GetDropDownButtonImage(state);
            if (drawImage != null)
                DrawImageHelper(context, drawImage, Color.Empty,
                                displayRect, orientation, PaletteImageEffect.Normal,
                                Color.Empty, Color.Empty);
        }
RenderStandard